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]
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 Debug for Interpolation[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Copy for Interpolation[src]
impl Clone for Interpolation[src]
fn clone(&self) -> Interpolation[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl From<u8> for Interpolation[src]
fn from(raw: u8) -> Interpolation[src]
Performs the conversion.