|
@@ -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)],
|