From 27a349d282bbca65151c3b9fd544f7869b2f0edc Mon Sep 17 00:00:00 2001 From: Joshua Smith Date: Mon, 21 Mar 2022 16:08:53 -0500 Subject: [PATCH] fix for `UnitComplex::slerp()` #1093 --- src/geometry/unit_complex.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/geometry/unit_complex.rs b/src/geometry/unit_complex.rs index 48405dd4..5d3e45b2 100755 --- a/src/geometry/unit_complex.rs +++ b/src/geometry/unit_complex.rs @@ -410,7 +410,8 @@ where #[inline] #[must_use] pub fn slerp(&self, other: &Self, t: T) -> Self { - Self::new(self.angle() * (T::one() - t.clone()) + other.angle() * t) + let delta = other / self; + self * Self::new(delta.angle()*t) } }