mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-15 10:53:50 +08:00
add a 4x4 inverse case which is not handled by the current
ei_compute_inverse_in_size4_case (reported by mikola on IRC)
This commit is contained in:
parent
ea41a18b80
commit
22edf77470
@ -77,4 +77,10 @@ void test_inverse()
|
|||||||
CALL_SUBTEST( inverse(MatrixXf(8,8)) );
|
CALL_SUBTEST( inverse(MatrixXf(8,8)) );
|
||||||
CALL_SUBTEST( inverse(MatrixXcd(7,7)) );
|
CALL_SUBTEST( inverse(MatrixXcd(7,7)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// test some tricky cases for 4x4 matrices
|
||||||
|
VERIFY_IS_APPROX((Matrix4f() << 0,0,1,0, 1,0,0,0, 0,1,0,0, 0,0,0,1).finished().inverse(),
|
||||||
|
(Matrix4f() << 0,1,0,0, 0,0,1,0, 1,0,0,0, 0,0,0,1).finished());
|
||||||
|
VERIFY_IS_APPROX((Matrix4f() << 1,0,0,0, 0,0,1,0, 0,0,0,1, 0,1,0,0).finished().inverse(),
|
||||||
|
(Matrix4f() << 1,0,0,0, 0,0,0,1, 0,1,0,0, 0,0,1,0).finished());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user