Trait vek::ops::Slerp
[−]
[src]
pub trait Slerp<Factor = f32>: Sized { type Output; fn slerp_unclamped(from: Self, to: Self, factor: Factor) -> Self::Output; fn slerp(from: Self, to: Self, factor: Factor) -> Self::Output
where
Factor: Clamp + Zero + One, { ... } }
A value that can be Spherically Linearly interpolated.
The Output
type allows this trait to be meaningfully implemented for &T
as well as T
.
Associated Types
type Output
The resulting type after performing the SLERP operation.
Required Methods
fn slerp_unclamped(from: Self, to: Self, factor: Factor) -> Self::Output
Performs spherical linear interpolation without implictly constraining factor
to
be between 0 and 1.
Provided Methods
fn slerp(from: Self, to: Self, factor: Factor) -> Self::Output where
Factor: Clamp + Zero + One,
Factor: Clamp + Zero + One,
Performs spherical linear interpolation, constraining factor
to
be between 0 and 1.
Implementors
impl<T> Slerp<T> for Vec3<T> where
T: Sum + Float + Clamp + Lerp<T, Output = T>, type Output = Self;impl<T, Factor> Slerp<Factor> for Quaternion<T> where
T: Lerp<T, Output = T> + Sum + Float,
Factor: Into<T>, type Output = Self;impl<'a, T, Factor> Slerp<Factor> for &'a Quaternion<T> where
T: Lerp<T, Output = T> + Sum + Float,
Factor: Into<T>, type Output = Quaternion<T>;