From d5bd82761abf3bdc5afb7154f2b3c0307b4444ab Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 6 Sep 2024 10:36:34 -0700 Subject: [PATCH] fix dot test --- fixed_wide_vectors/src/tests/tests.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/fixed_wide_vectors/src/tests/tests.rs b/fixed_wide_vectors/src/tests/tests.rs index a3530ea..91336ca 100644 --- a/fixed_wide_vectors/src/tests/tests.rs +++ b/fixed_wide_vectors/src/tests/tests.rs @@ -16,16 +16,17 @@ fn test_arithmetic(){ #[test] fn matrix_dot(){ + + let rhs=Matrix4x2::new([ + [ 1.0, 2.0], + [ 3.0, 4.0], + [ 5.0, 6.0], + [ 7.0, 8.0], + ]); let lhs=Matrix3x4::new([ - [1.0,2.0,3.0,4.0], - [5.0,6.0,7.0,8.0], - [9.0,1.0,1.0,1.0], - ]); - let rhs=Matrix4x2::new([ - [1.0,2.0], - [3.0,4.0], - [5.0,6.0], - [7.0,8.0], + [1.0, 2.0, 3.0, 4.0],// [ 50.0, 60.0], + [5.0, 6.0, 7.0, 8.0],// [114.0,140.0], + [9.0,10.0,11.0,12.0],// [178.0,220.0], ]); // Mat3.dot(Mat4) -> Mat3 let m_dot=lhs.dot(rhs);