Skip to main content

Ease

Trait Ease 

Source
pub trait Ease {
    // Required method
    fn ease(&self, t: f64) -> f64;
}
Expand description

Maps linear progress t ∈ [0, 1] to eased progress.

Implemented by CubicBezier and by any Fn(f64) -> f64, which is how elastic_out, bounce_out and friends plug in.

Required Methods§

Source

fn ease(&self, t: f64) -> f64

Eased progress for t in 0..=1 (may overshoot for back/elastic).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Ease for CubicBezier

Source§

impl<F: Fn(f64) -> f64> Ease for F