fix for `UnitComplex::slerp()` #1093

This commit is contained in:
Joshua Smith 2022-03-21 16:08:53 -05:00 committed by Saurabh
parent 1c9ac6616c
commit 1e1135ef64
1 changed files with 2 additions and 1 deletions

View File

@ -410,7 +410,8 @@ where
#[inline] #[inline]
#[must_use] #[must_use]
pub fn slerp(&self, other: &Self, t: T) -> Self { 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)
} }
} }