pub struct Linear;Expand description
Marker type for linear smoothing.
Uses additive interpolation: current + increment.
Best for parameters with linear perception (e.g., pan position).
Trait Implementations§
Source§impl SmoothingStrategy for Linear
impl SmoothingStrategy for Linear
Source§fn update_increment<S>(current: S, target: S, num_samples: f64) -> f64where
S: Sample,
fn update_increment<S>(current: S, target: S, num_samples: f64) -> f64where
S: Sample,
Calculate the increment value for smoothing.
Returns f64 for precision in smoothing calculations.
Source§fn apply_increment<S>(current: S, increment: f64) -> Swhere
S: Sample,
fn apply_increment<S>(current: S, increment: f64) -> Swhere
S: Sample,
Apply the increment to the current value.
Source§fn apply_increment_n<S>(current: S, increment: f64, n: i32) -> Swhere
S: Sample,
fn apply_increment_n<S>(current: S, increment: f64, n: i32) -> Swhere
S: Sample,
Apply the increment multiple times (for skip).
Source§fn default_value<S>() -> Swhere
S: Sample,
fn default_value<S>() -> Swhere
S: Sample,
Default initial value for this smoothing type.
impl Copy for Linear
Auto Trait Implementations§
impl Freeze for Linear
impl RefUnwindSafe for Linear
impl Send for Linear
impl Sync for Linear
impl Unpin for Linear
impl UnwindSafe for Linear
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more