Trait maths_rs::num::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

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>,