Trait Lerpable

Source
pub trait Lerpable: Sized {
    // Required method
    fn lerp_unchecked(self, dest: Self, coef: float) -> Self;

    // Provided method
    fn lerp(self, dest: Self, coef: float) -> Self { ... }
}

Required Methods§

Source

fn lerp_unchecked(self, dest: Self, coef: float) -> Self

Not restricted between [0..1]

Provided Methods§

Source

fn lerp(self, dest: Self, coef: float) -> Self

Restricted between [0..1]

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.

Implementors§

Source§

impl<T> Lerpable for T
where T: Mul<float, Output = Self> + Add<Self, Output = Self> + Sized,

Source§

impl<T, const N: usize> Lerpable for Rectangle<T, N>
where T: Number, Vector<T, N>: Lerpable,