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

This commit is contained in:
Joshua Smith 2022-03-21 16:08:53 -05:00
parent a46f172fe4
commit 27a349d282
1 changed files with 2 additions and 1 deletions

View File

@ -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)
}
}