pub trait SmoothingStrategy: Clone + Default {
// Required methods
fn update_increment<S: Sample>(
current: S,
target: S,
num_samples: f64,
) -> f64;
fn apply_increment<S: Sample>(current: S, increment: f64) -> S;
fn apply_increment_n<S: Sample>(current: S, increment: f64, n: i32) -> S;
fn default_value<S: Sample>() -> S;
}Expand description
Trait defining smoothing behavior for different interpolation strategies.
Required Methods§
Sourcefn update_increment<S: Sample>(current: S, target: S, num_samples: f64) -> f64
fn update_increment<S: Sample>(current: S, target: S, num_samples: f64) -> f64
Calculate the increment value for smoothing. Returns f64 for precision in smoothing calculations.
Sourcefn apply_increment<S: Sample>(current: S, increment: f64) -> S
fn apply_increment<S: Sample>(current: S, increment: f64) -> S
Apply the increment to the current value.
Sourcefn apply_increment_n<S: Sample>(current: S, increment: f64, n: i32) -> S
fn apply_increment_n<S: Sample>(current: S, increment: f64, n: i32) -> S
Apply the increment multiple times (for skip).
Sourcefn default_value<S: Sample>() -> S
fn default_value<S: Sample>() -> S
Default initial value for this smoothing type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.