Trait interpolation::Lerp[][src]

pub trait Lerp {
    type Scalar;
    fn lerp(&self, other: &Self, scalar: &Self::Scalar) -> Self;
}
[]

Describes a type that can linearly interpolate between two points.

Associated Types

type Scalar[src][]

The scaling type for linear interpolation.

Required methods

fn lerp(&self, other: &Self, scalar: &Self::Scalar) -> Self[src][]

Given self and another point other, return a point on a line running between the two that is scalar fraction of the distance between the two points.

Implementations on Foreign Types

impl Lerp for f32[src][]

type Scalar = f32

impl Lerp for f64[src][]

type Scalar = f64

impl Lerp for i8[src][]

type Scalar = f32

impl Lerp for i16[src][]

type Scalar = f32

impl Lerp for i32[src][]

type Scalar = f32

impl Lerp for i64[src][]

type Scalar = f64

impl Lerp for u8[src][]

type Scalar = f32

impl Lerp for u16[src][]

type Scalar = f32

impl Lerp for u32[src][]

type Scalar = f32

impl Lerp for u64[src][]

type Scalar = f64

impl<T> Lerp for [T; 1] where
    T: Lerp
[src][]

type Scalar = T::Scalar

impl<T> Lerp for [T; 2] where
    T: Lerp
[src][]

type Scalar = T::Scalar

impl<T> Lerp for [T; 3] where
    T: Lerp
[src][]

type Scalar = T::Scalar

impl<T> Lerp for [T; 4] where
    T: Lerp
[src][]

type Scalar = T::Scalar

impl<T> Lerp for [T; 5] where
    T: Lerp
[src][]

type Scalar = T::Scalar

Implementors