test 4x4 multiplication
This commit is contained in:
parent
ea6114b9ae
commit
3d2d763a3b
@ -339,4 +339,28 @@ mod tests {
|
||||
);
|
||||
assert_ne!(a, b);
|
||||
}
|
||||
#[test]
|
||||
fn mul4x4() {
|
||||
let a = Matrix4x4::new(
|
||||
[1., 2., 3., 4.],
|
||||
[5., 6., 7., 8.],
|
||||
[9., 8., 7., 6.],
|
||||
[5., 4., 3., 2.],
|
||||
);
|
||||
let b = Matrix4x4::new(
|
||||
[-2., 1., 2., 3.],
|
||||
[3., 2., 1., -1.],
|
||||
[4., 3., 6., 5.],
|
||||
[1., 2., 7., 8.],
|
||||
);
|
||||
assert_eq!(
|
||||
a * b,
|
||||
Matrix4x4::new(
|
||||
[20., 22., 50., 48.],
|
||||
[44., 54., 114., 108.],
|
||||
[40., 58., 110., 102.],
|
||||
[16., 26., 46., 42.],
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user