[][src]Struct dasp::interpolate::linear::Linear

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

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

Required Features

  • When using dasp_interpolate, this item requires the linear feature to be enabled.
  • When using dasp, this item requires the interpolate-linear feature to be enabled.

Implementations

impl<F> Linear<F>[src]

pub fn new(left: F, right: F) -> Linear<F>[src]

Create a new Linear Interpolator, where left and right are the first two frames to be interpolated.

Required Features

  • When using dasp_interpolate, this item requires the linear feature to be enabled.
  • When using dasp, this item requires the interpolate-linear feature to be enabled.

Trait Implementations

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

type Frame = F

The type of frame over which the interpolate may operate.

fn interpolate(&self, x: f64) -> <Linear<F> as Interpolator>::Frame[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.

Auto Trait Implementations

impl<F> RefUnwindSafe for Linear<F> where
    F: RefUnwindSafe

impl<F> Send for Linear<F> where
    F: Send

impl<F> Sync for Linear<F> where
    F: Sync

impl<F> Unpin for Linear<F> where
    F: Unpin

impl<F> UnwindSafe for Linear<F> where
    F: UnwindSafe

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<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 
[src]

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

impl<S> FromSample<S> for S[src]

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

impl<T, U> ToSample<U> for T where
    U: FromSample<T>, 
[src]

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.