From a9ed6cb62164964376fd0ac979c468c7435c2be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Sat, 7 Aug 2021 21:22:32 +0200 Subject: [PATCH] Fix wrong sign in UnitComplex::axis_angle --- src/geometry/unit_complex.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/geometry/unit_complex.rs b/src/geometry/unit_complex.rs index 87af3200..2c621674 100755 --- a/src/geometry/unit_complex.rs +++ b/src/geometry/unit_complex.rs @@ -144,10 +144,10 @@ where if ang.is_zero() { None - } else if ang.is_sign_negative() { - Some((Unit::new_unchecked(Vector1::x()), -ang.clone())) + } else if ang.is_sign_positive() { + Some((Unit::new_unchecked(Vector1::x()), ang)) } else { - Some((Unit::new_unchecked(-Vector1::::x()), ang)) + Some((Unit::new_unchecked(-Vector1::::x()), -ang)) } }