Fix docs for quaternion interpolation (#12014)

# Objective

The docs currently state that it's doing an nlerp, which is not true.

## Solution

Docs now describe the implementation.
This commit is contained in:
Martin Svanberg 2024-02-21 00:26:40 +01:00 committed by GitHub
parent dc25edd0a2
commit 37e632145a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -142,8 +142,7 @@ impl Animatable for Transform {
} }
impl Animatable for Quat { impl Animatable for Quat {
/// Performs an nlerp, because it's cheaper and easier to combine with other animations, /// Performs a slerp to smoothly interpolate between quaternions.
/// reference: <http://number-none.com/product/Understanding%20Slerp,%20Then%20Not%20Using%20It/>
#[inline] #[inline]
fn interpolate(a: &Self, b: &Self, t: f32) -> Self { fn interpolate(a: &Self, b: &Self, t: f32) -> Self {
// We want to smoothly interpolate between the two quaternions by default, // We want to smoothly interpolate between the two quaternions by default,