Trait Lerp

Source
pub trait Lerp<T: Float> {
    // Required method
    fn lerp(e0: Self, e1: Self, t: T) -> Self;
}
Expand description

trait for performing linear interpolation on scalars, vectors or quaternions

Required Methods§

Source

fn lerp(e0: Self, e1: Self, t: T) -> Self

returns linear interpolation of t between e0 and e1, t specifies the ratio to interpolate between the values

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Lerp<f32> for f32

Source§

fn lerp(e0: Self, e1: Self, t: Self) -> Self

Source§

impl Lerp<f64> for f64

Source§

fn lerp(e0: Self, e1: Self, t: Self) -> Self

Implementors§

Source§

impl<T> Lerp<T> for Quat<T>
where T: Float + FloatOps<T> + NumberOps<T>,

returns a quaternion lineraly interpolated between e0 and e1 by percentage t

Source§

impl<T> Lerp<T> for Vec2<T>
where T: Float + Lerp<T>,

Source§

impl<T> Lerp<T> for Vec3<T>
where T: Float + Lerp<T>,

Source§

impl<T> Lerp<T> for Vec4<T>
where T: Float + Lerp<T>,