Add test case for issue 1078

This commit is contained in:
Tim Taubner 2022-03-31 18:03:59 +02:00 committed by Sébastien Crozet
parent f9aa2d76aa
commit 257d95b3d3
1 changed files with 4 additions and 0 deletions

View File

@ -28,6 +28,10 @@ fn from_rotation_matrix() {
1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0,
));
assert_relative_eq!(rotated_z, &Rotation3::from_axis_angle(&UnitVector3::new_unchecked(Vector3::new(1.0, 0.0, 0.0)), PI), epsilon = 0.001);
// Test that issue 1078 is fixed
let m = nalgebra::Matrix3::<f64>::new(0.0, 0.0, 1.0, 0.0, -1.0, 0.0, 1.0, 0.0, 0.0);
assert_relative_ne!(identity, nalgebra::Rotation3::from_matrix(&m));
assert_relative_eq!(nalgebra::Rotation3::from_matrix_unchecked(m.clone()), nalgebra::Rotation3::from_matrix(&m));
}
#[test]