Enum rust_rocket::interpolation::Interpolation  
source · pub enum Interpolation {
    Step,
    Linear,
    Smooth,
    Ramp,
}Expand description
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
sourceimpl Interpolation
 
impl Interpolation
sourcepub fn interpolate(&self, t: f32) -> f32
 
pub fn interpolate(&self, t: f32) -> f32
This performs the interpolation.
Examples
assert_eq!(Interpolation::Linear.interpolate(0.5), 0.5);assert_eq!(Interpolation::Step.interpolate(0.5), 0.);Trait Implementations
sourceimpl Clone for Interpolation
 
impl Clone for Interpolation
sourcefn clone(&self) -> Interpolation
 
fn clone(&self) -> Interpolation
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moresourceimpl Debug for Interpolation
 
impl Debug for Interpolation
sourceimpl From<u8> for Interpolation
 
impl From<u8> for Interpolation
sourcefn from(raw: u8) -> Interpolation
 
fn from(raw: u8) -> Interpolation
Converts to this type from the input type.
impl Copy for Interpolation
Auto Trait Implementations
impl RefUnwindSafe for Interpolation
impl Send for Interpolation
impl Sync for Interpolation
impl Unpin for Interpolation
impl UnwindSafe for Interpolation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more