From 0c2d9deac7da51c91cd5d2b8e08bcf05350cece0 Mon Sep 17 00:00:00 2001 From: Tim Taubner Date: Wed, 27 Jul 2022 11:44:42 +0200 Subject: [PATCH] cargo fmt --- src/geometry/rotation_specialization.rs | 9 +++++++-- tests/geometry/rotation.rs | 12 ++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/geometry/rotation_specialization.rs b/src/geometry/rotation_specialization.rs index fc2c9b93..c9197fd6 100644 --- a/src/geometry/rotation_specialization.rs +++ b/src/geometry/rotation_specialization.rs @@ -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; } } diff --git a/tests/geometry/rotation.rs b/tests/geometry/rotation.rs index f5a77b54..2e8d2482 100644 --- a/tests/geometry/rotation.rs +++ b/tests/geometry/rotation.rs @@ -34,11 +34,7 @@ fn from_rotation_matrix() { ); // Test that issue 627 is fixed let m_627 = Matrix3::::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::::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),