image::traits

Trait Lerp

Source
pub trait Lerp: Bounded + NumCast {
    type Ratio: Primitive;

    // Provided method
    fn lerp(a: Self, b: Self, ratio: Self::Ratio) -> Self { ... }
}
Expand description

Linear interpolation without involving floating numbers.

Required Associated Types§

Provided Methods§

Source

fn lerp(a: Self, b: Self, ratio: Self::Ratio) -> Self

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 for f32

Source§

type Ratio = f32

Source§

fn lerp(a: Self, b: Self, ratio: Self::Ratio) -> Self

Source§

impl Lerp for u8

Source§

impl Lerp for u16

Source§

impl Lerp for u32

Implementors§