Skip to main content

Lerp

Trait Lerp 

Source
pub trait Lerp: Sized {
    // Required method
    fn lerp(self, other: Self, t: f32) -> Self;
}
Expand description

Types that can be linearly interpolated.

Required Methods§

Source

fn lerp(self, other: Self, t: f32) -> Self

Linear interpolation from self toward other by factor t (clamped 0..1).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Lerp for f32

Source§

fn lerp(self, other: Self, t: f32) -> Self

Implementors§