forked from M-Labs/nalgebra
cargo fmt
This commit is contained in:
parent
7aadbcf21d
commit
0c2d9deac7
@ -760,9 +760,14 @@ where
|
||||
|
||||
// Perturb until the new norm is significantly different
|
||||
loop {
|
||||
perturbed *= Rotation3::from_axis_angle(&perturbation_axes, eps_disturbance.clone());
|
||||
perturbed *=
|
||||
Rotation3::from_axis_angle(&perturbation_axes, eps_disturbance.clone());
|
||||
new_norm_squared = (m - &perturbed).norm_squared();
|
||||
if abs_diff_ne!(norm_squared, new_norm_squared, epsilon = T::default_epsilon()) {
|
||||
if abs_diff_ne!(
|
||||
norm_squared,
|
||||
new_norm_squared,
|
||||
epsilon = T::default_epsilon()
|
||||
) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -34,11 +34,7 @@ fn from_rotation_matrix() {
|
||||
);
|
||||
// Test that issue 627 is fixed
|
||||
let m_627 = Matrix3::<f64>::new(-1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0);
|
||||
assert_relative_ne!(
|
||||
identity,
|
||||
Rotation3::from_matrix(&m_627),
|
||||
epsilon = 0.01
|
||||
);
|
||||
assert_relative_ne!(identity, Rotation3::from_matrix(&m_627), epsilon = 0.01);
|
||||
assert_relative_eq!(
|
||||
Rotation3::from_matrix_unchecked(m_627.clone()),
|
||||
Rotation3::from_matrix(&m_627),
|
||||
@ -46,11 +42,7 @@ fn from_rotation_matrix() {
|
||||
);
|
||||
// Test that issue 1078 is fixed
|
||||
let m_1078 = 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,
|
||||
Rotation3::from_matrix(&m_1078),
|
||||
epsilon = 0.01
|
||||
);
|
||||
assert_relative_ne!(identity, Rotation3::from_matrix(&m_1078), epsilon = 0.01);
|
||||
assert_relative_eq!(
|
||||
Rotation3::from_matrix_unchecked(m_1078.clone()),
|
||||
Rotation3::from_matrix(&m_1078),
|
||||
|
Loading…
Reference in New Issue
Block a user