Trait rhusics_transform::Interpolate
source · pub trait Interpolate<S> {
fn interpolate(&self, other: &Self, amount: S) -> Self;
}
Expand description
Required Methods
sourcefn interpolate(&self, other: &Self, amount: S) -> Self
fn interpolate(&self, other: &Self, amount: S) -> Self
Interpolate between self
and other
, using amount to calculate how much of other to use.
Parameters:
amount
: amount in the range 0. .. 1.other
: the other value to interpolate with
Returns
A new value approximately equal to self * (1. - amount) + other * amount
.