fix dot test

This commit is contained in:
Quaternions 2024-09-06 10:36:34 -07:00
parent 5cad8637cd
commit d5bd82761a

View File

@ -16,17 +16,18 @@ fn test_arithmetic(){
#[test]
fn matrix_dot(){
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],
]);
let lhs=Matrix3x4::new([
[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<Vec4>.dot(Mat4<Vec2>) -> Mat3<Vec2>
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}}