From b6d260bf2cd5855057b9024f3e2ec3431728d88e Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 9 Sep 2024 16:55:44 -0700 Subject: [PATCH] update tests to use new ideas --- fixed_wide_vectors/src/tests/fixed_wide.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fixed_wide_vectors/src/tests/fixed_wide.rs b/fixed_wide_vectors/src/tests/fixed_wide.rs index b0f4895..366240d 100644 --- a/fixed_wide_vectors/src/tests/fixed_wide.rs +++ b/fixed_wide_vectors/src/tests/fixed_wide.rs @@ -8,9 +8,9 @@ type Planar64Wide3=fixed_wide::types::I256F256; #[test] fn wide_vec3(){ let v=Vector3::from_value(Planar64::from(3)); - let v1=v.wide_mul_1_1(v); - let v2=v1.wide_mul_2_2(v1); - let v3=v2.wide_mul_4_4(v2); + let v1=v*v; + let v2=v1*v1; + let v3=v2*v2; assert_eq!(v3.array,Vector3::from_value(Planar64Wide3::from(3i128.pow(8))).array); } @@ -18,9 +18,9 @@ fn wide_vec3(){ #[test] fn wide_vec3_dot(){ let v=Vector3::from_value(Planar64::from(3)); - let v1=v.wide_mul_1_1(v); - let v2=v1.wide_mul_2_2(v1); - let v3=v2.wide_dot_4_4(v2); + let v1=v*v; + let v2=v1*v1; + let v3=v2.dot(v2); assert_eq!(v3,Planar64Wide3::from(3i128.pow(8)*3)); } @@ -28,9 +28,9 @@ fn wide_vec3_dot(){ #[test] fn wide_vec3_length_squared(){ let v=Vector3::from_value(Planar64::from(3)); - let v1=v.wide_mul_1_1(v); - let v2=v1.wide_mul_2_2(v1); - let v3=v2.wide_length_squared(); + let v1=v*v; + let v2=v1*v1; + let v3=v2.length_squared(); assert_eq!(v3,Planar64Wide3::from(3i128.pow(8)*3)); } @@ -49,7 +49,7 @@ fn wide_matrix_dot(){ [Planar64::from(7),Planar64::from(8)], ]); // Mat3.dot(Mat4) -> Mat3 - let m_dot=lhs.wide_dot_1_1(rhs); + let m_dot=lhs.dot(rhs); //In[1]:= {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}} . {{1, 2}, {3, 4}, {5, 6}, {7, 8}} //Out[1]= {{50, 60}, {114, 140}, {178, 220}} assert_eq!(