[][src]Trait prisma::Lerp

pub trait Lerp {
    type Position: Float;
    fn lerp(&self, right: &Self, pos: Self::Position) -> Self;
}

A value that can be linearly interpolated between two values

Associated Types

type Position: Float

The type of the pos argument

Loading content...

Required methods

fn lerp(&self, right: &Self, pos: Self::Position) -> Self

Interpolate between self and right

pos specifies how far between the two values to interpolate on a line, between zero and one.

$pos = 0$ would return self while $pos = 1$ would return right.

Loading content...

Implementations on Foreign Types

impl<T> Lerp for Deg<T> where
    T: Float
[src]

type Position = T

impl<T> Lerp for Rad<T> where
    T: Float
[src]

type Position = T

impl<T> Lerp for Turns<T> where
    T: Float
[src]

type Position = T

impl<T> Lerp for ArcMinutes<T> where
    T: Float
[src]

type Position = T

impl<T> Lerp for ArcSeconds<T> where
    T: Float
[src]

type Position = T

impl Lerp for u8[src]

type Position = f64

impl Lerp for u16[src]

type Position = f64

impl Lerp for u32[src]

type Position = f64

impl Lerp for f32[src]

type Position = f32

impl Lerp for f64[src]

type Position = f64

Loading content...

Implementors

impl<C, E> Lerp for EncodedColor<C, E> where
    C: Color + Lerp + EncodableColor,
    E: ColorEncoding + PartialEq
[src]

type Position = C::Position

impl<T> Lerp for AngularChannel<T> where
    T: Angle + Lerp
[src]

type Position = T::Position

impl<T> Lerp for NormalBoundedChannel<T> where
    T: NormalChannelScalar + Lerp
[src]

type Position = <T as Lerp>::Position

impl<T> Lerp for PosNormalBoundedChannel<T> where
    T: PosNormalChannelScalar + Lerp
[src]

type Position = <T as Lerp>::Position

impl<T> Lerp for FreeChannel<T> where
    T: FreeChannelScalar + Lerp
[src]

type Position = <T as Lerp>::Position

impl<T> Lerp for PosFreeChannel<T> where
    T: FreeChannelScalar + Lerp
[src]

type Position = <T as Lerp>::Position

impl<T> Lerp for Rgb<T> where
    T: PosNormalChannelScalar + Lerp
[src]

type Position = <T as Lerp>::Position

impl<T> Lerp for Rgi<T> where
    T: PosNormalChannelScalar + Lerp + Float
[src]

type Position = <T as Lerp>::Position

impl<T> Lerp for XyY<T> where
    T: FreeChannelScalar + PosNormalChannelScalar + Float,
    FreeChannel<T>: Lerp,
    PosNormalBoundedChannel<T>: Lerp<Position = <FreeChannel<T> as Lerp>::Position>, 
[src]

type Position = <FreeChannel<T> as Lerp>::Position

impl<T> Lerp for Xyz<T> where
    T: FreeChannelScalar,
    PosFreeChannel<T>: Lerp
[src]

type Position = <PosFreeChannel<T> as Lerp>::Position

impl<T> Lerp for BareYCbCr<T> where
    T: PosNormalChannelScalar + NormalChannelScalar + Lerp
[src]

type Position = <T as Lerp>::Position

impl<T, A> Lerp for Hsi<T, A> where
    T: PosNormalChannelScalar + Lerp,
    A: AngularChannelScalar + Lerp
[src]

type Position = A::Position

impl<T, A> Lerp for Hsl<T, A> where
    T: PosNormalChannelScalar + Lerp,
    A: AngularChannelScalar + Lerp
[src]

type Position = A::Position

impl<T, A> Lerp for Hsv<T, A> where
    T: PosNormalChannelScalar + Lerp,
    A: AngularChannelScalar + Lerp
[src]

type Position = A::Position

impl<T, A> Lerp for Hwb<T, A> where
    T: PosNormalChannelScalar + Float + Lerp,
    A: AngularChannelScalar + Lerp
[src]

type Position = A::Position

impl<T, A> Lerp for eHsi<T, A> where
    T: PosNormalChannelScalar + Lerp,
    A: AngularChannelScalar + Lerp
[src]

type Position = A::Position

impl<T, C, E, S> Lerp for SpacedColor<T, C, E, S> where
    C: Color + EncodableColor + Lerp,
    S: ColorSpace<T> + PartialEq + Clone,
    E: ColorEncoding + PartialEq,
    T: PartialEq + Clone + Float
[src]

type Position = C::Position

impl<T, InnerColor> Lerp for Alpha<T, InnerColor> where
    T: PosNormalChannelScalar + Lerp<Position = InnerColor::Position>,
    InnerColor: Color + Lerp
[src]

type Position = InnerColor::Position

impl<T, M> Lerp for YCbCr<T, M> where
    T: NormalChannelScalar + Lerp + PosNormalChannelScalar,
    M: YCbCrModel<T>, 
[src]

type Position = <T as Lerp>::Position

impl<T, Model> Lerp for Lms<T, Model> where
    T: FreeChannelScalar,
    Model: LmsModel<T>,
    FreeChannel<T>: Lerp
[src]

type Position = <FreeChannel<T> as Lerp>::Position

impl<T, W> Lerp for Lab<T, W> where
    T: FreeChannelScalar + Lerp,
    W: WhitePoint<T>, 
[src]

type Position = <FreeChannel<T> as Lerp>::Position

impl<T, W> Lerp for Luv<T, W> where
    T: FreeChannelScalar + Lerp,
    W: WhitePoint<T>, 
[src]

type Position = <FreeChannel<T> as Lerp>::Position

impl<T, W, A> Lerp for Lchab<T, W, A> where
    T: FreeChannelScalar + Lerp,
    A: AngularChannelScalar + Lerp,
    W: WhitePoint<T>, 
[src]

type Position = A::Position

impl<T, W, A> Lerp for Lchuv<T, W, A> where
    T: FreeChannelScalar + Lerp,
    A: AngularChannelScalar + Lerp,
    W: WhitePoint<T>, 
[src]

type Position = A::Position

Loading content...