Skip to content

Commit

Permalink
Fix docs for quaternion interpolation (bevyengine#12014)
Browse files Browse the repository at this point in the history
# Objective

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

## Solution

Docs now describe the implementation.
  • Loading branch information
msvbg authored Feb 20, 2024
1 parent dc25edd commit 37e6321
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/bevy_animation/src/animatable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ impl Animatable for Transform {
}

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

0 comments on commit 37e6321

Please sign in to comment.