Trait SmoothingStrategy

Source
pub trait SmoothingStrategy: Clone + Default {
    // Required methods
    fn update_increment<S>(current: S, target: S, num_samples: f64) -> f64
       where S: Sample;
    fn apply_increment<S>(current: S, increment: f64) -> S
       where S: Sample;
    fn apply_increment_n<S>(current: S, increment: f64, n: i32) -> S
       where S: Sample;
    fn default_value<S>() -> S
       where S: Sample;
}
Expand description

Trait defining smoothing behavior for different interpolation strategies.

Required Methods§

Source

fn update_increment<S>(current: S, target: S, num_samples: f64) -> f64
where S: Sample,

Calculate the increment value for smoothing. Returns f64 for precision in smoothing calculations.

Source

fn apply_increment<S>(current: S, increment: f64) -> S
where S: Sample,

Apply the increment to the current value.

Source

fn apply_increment_n<S>(current: S, increment: f64, n: i32) -> S
where S: Sample,

Apply the increment multiple times (for skip).

Source

fn default_value<S>() -> S
where S: Sample,

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.

Implementors§