Enum rust_rocket::interpolation::Interpolation
[−]
[src]
pub enum Interpolation {
Step,
Linear,
Smooth,
Ramp,
}The Interpolation Type.
This represents the various forms of interpolation that can be performed.
Variants
Step0
Lineart
Smootht * t * (3 - 2 * t)
Rampt.powi(2)
Methods
impl Interpolation[src]
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
impl Debug for Interpolation[src]
impl Copy for Interpolation[src]
impl Clone for Interpolation[src]
fn clone(&self) -> Interpolation
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl From<u8> for Interpolation[src]
fn from(raw: u8) -> Interpolation
Performs the conversion.