Struct sample::interpolate::Linear [] [src]

pub struct Linear<F> { /* fields omitted */ }

Interpolator that interpolates linearly between the previous value and the next value

Methods

impl<F> Linear<F>
[src]

[src]

Create a new Linear Interpolator.

[src]

Consumes the first value from a given source to initialize itself. If the source has no values, this will return None.

Trait Implementations

impl<F> Interpolator for Linear<F> where
    F: Frame,
    <F as Frame>::Sample: Duplex<f64>, 
[src]

[src]

Converts linearly from the previous value, using the next value to interpolate. It is possible, although not advisable, to provide an x > 1.0 or < 0.0, but this will just continue to be a linear ramp in one direction or another.

[src]

Called whenever the Interpolator value steps passed 1.0.