write m*v test
This commit is contained in:
parent
b772647137
commit
57c3f2dd9e
@ -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(){
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user