소스 검색

corrected result type

Felix Bytow 2 년 전
부모
커밋
3e6d5e9edb
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/types/matrix/generic.rs

+ 2 - 2
src/types/matrix/generic.rs

@@ -439,14 +439,14 @@ impl<T: Numeric, const ROWS: usize, const COMMON: usize, const COLUMNS: usize> M
 
 /// Apply a transformation matrix to a column vector.
 impl<T: Numeric + Float + Primitive> Mul<ColumnVector<T, 3>> for SquareMatrix<T, 4> {
-    type Output = ColumnVector<T, 3>;
+    type Output = RowVector<T, 3>;
 
     fn mul(self, rhs: ColumnVector<T, 3>) -> Self::Output {
         let x_old = rhs[(0, 0)];
         let y_old = rhs[(1, 0)];
         let z_old = rhs[(2, 0)];
 
-        cvec![
+        rvec![
             self[(0,0)] * x_old + self[(0, 1)] * y_old + self[(0, 2)] * z_old + self[(0, 3)],
             self[(1,0)] * x_old + self[(1, 1)] * y_old + self[(1, 2)] * z_old + self[(1, 3)],
             self[(2,0)] * x_old + self[(2, 1)] * y_old + self[(2, 2)] * z_old + self[(2, 3)],