[−][src]Struct sample::interpolate::Linear
Interpolator that interpolates linearly between the previous value and the next value
Implementations
impl<F> Linear<F>
[src]
pub fn new(left: F, right: F) -> Linear<F>
[src]
Create a new Linear Interpolator.
pub fn from_source<S>(source: &mut S) -> Linear<F> where
F: Frame,
S: Signal<Frame = F>,
[src]
F: Frame,
S: Signal<Frame = F>,
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::Sample: Duplex<f64>,
[src]
F: Frame,
F::Sample: Duplex<f64>,
type Frame = F
fn interpolate(&self, x: f64) -> Self::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.
fn next_source_frame(&mut self, source_frame: Self::Frame)
[src]
Auto Trait Implementations
impl<F> RefUnwindSafe for Linear<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for Linear<F> where
F: Send,
F: Send,
impl<F> Sync for Linear<F> where
F: Sync,
F: Sync,
impl<F> Unpin for Linear<F> where
F: Unpin,
F: Unpin,
impl<F> UnwindSafe for Linear<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,
impl<T> From<T> for T
[src]
impl<S> FromSample<S> for S
[src]
fn from_sample_(S) -> S
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(Self) -> U
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,