[][src]Enum rust_rocket::interpolation::Interpolation

pub enum Interpolation {
    Step,
    Linear,
    Smooth,
    Ramp,
}

The Interpolation Type. This represents the various forms of interpolation that can be performed.

Variants

Step

0

Linear

t

Smooth

t * t * (3 - 2 * t)

Ramp

t.powi(2)

Implementations

impl Interpolation[src]

pub fn interpolate(&self, t: f32) -> f32[src]

This performs the interpolation.

Examples

assert_eq!(Interpolation::Linear.interpolate(0.5), 0.5);
assert_eq!(Interpolation::Step.interpolate(0.5), 0.);

Trait Implementations

impl Clone for Interpolation[src]

impl Copy for Interpolation[src]

impl Debug for Interpolation[src]

impl<'de> Deserialize<'de> for Interpolation[src]

impl From<u8> for Interpolation[src]

impl Serialize for Interpolation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.