Trait image::traits::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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Lerp for f32

§

type Ratio = f32

source§

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

source§

impl Lerp for u8

§

type Ratio = f32

source§

impl Lerp for u16

§

type Ratio = f32

source§

impl Lerp for u32

§

type Ratio = f64

Implementors§