diff --git a/fixed_wide_vectors/src/tests/tests.rs b/fixed_wide_vectors/src/tests/tests.rs index 04a5d55..41233b2 100644 --- a/fixed_wide_vectors/src/tests/tests.rs +++ b/fixed_wide_vectors/src/tests/tests.rs @@ -1,4 +1,4 @@ -use crate::types::{Vector3,Matrix4x3,Matrix2x4,Matrix2x3}; +use crate::types::{Vector2,Vector3,Matrix4x3,Matrix2x4,Matrix2x3,Matrix3x2}; #[test] fn test_bool(){ @@ -19,6 +19,17 @@ fn test_arithmetic(){ assert_eq!((a+a*2).array,Vector3::new([1*3,2*3,3*3]).array); } +#[test] +fn matrix_transform_vector(){ + let m=Matrix3x2::new([ + [1,2,3], + [4,5,6], + ]); + let v=Vector3::new([1,2,3]); + let transformed=m*v; + assert_eq!(transformed.array,Vector2::new([14,32]).array); +} + #[test] fn matrix_dot(){