[][src]Trait vek::ops::Slerp

pub trait Slerp<Factor = f32>: Sized {
    type Output;
    pub fn slerp_unclamped(from: Self, to: Self, factor: Factor) -> Self::Output;

    pub 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[src]

The resulting type after performing the SLERP operation.

Loading content...

Required methods

pub fn slerp_unclamped(from: Self, to: Self, factor: Factor) -> Self::Output[src]

Performs spherical linear interpolation without implictly constraining factor to be between 0 and 1.

Loading content...

Provided methods

pub fn slerp(from: Self, to: Self, factor: Factor) -> Self::Output where
    Factor: Clamp + Zero + One
[src]

Performs spherical linear interpolation, constraining factor to be between 0 and 1.

Loading content...

Implementors

impl<'a, T, Factor> Slerp<Factor> for &'a vek::quaternion::repr_c::Quaternion<T> where
    T: Lerp<T, Output = T> + Add<T, Output = T> + Real,
    Factor: Into<T>, 
[src]

type Output = Quaternion<T>

impl<'a, T, Factor> Slerp<Factor> for &'a vek::quaternion::repr_simd::Quaternion<T> where
    T: Lerp<T, Output = T> + Add<T, Output = T> + Real,
    Factor: Into<T>, 
[src]

type Output = Quaternion<T>

impl<T> Slerp<T> for vek::vec::repr_c::vec3::Vec3<T> where
    T: Add<T, Output = T> + Real + Clamp + Lerp<T, Output = T>, 
[src]

type Output = Self

impl<T> Slerp<T> for vek::vec::repr_simd::vec3::Vec3<T> where
    T: Add<T, Output = T> + Real + Clamp + Lerp<T, Output = T>, 
[src]

type Output = Self

impl<T, Factor> Slerp<Factor> for vek::quaternion::repr_c::Quaternion<T> where
    T: Lerp<T, Output = T> + Add<T, Output = T> + Real,
    Factor: Into<T>, 
[src]

type Output = Self

impl<T, Factor> Slerp<Factor> for vek::quaternion::repr_simd::Quaternion<T> where
    T: Lerp<T, Output = T> + Add<T, Output = T> + Real,
    Factor: Into<T>, 
[src]

type Output = Self

Loading content...