Type Alias zng_var::animation::easing::EasingStep
source · pub type EasingStep = Factor;
Expand description
Easing function output.
Usually in the [0..=1] range, but can overshoot. An easing function converts a EasingTime
into this factor.
§Examples
use zng_unit::*;
use zng_var::animation::easing::{EasingStep, EasingTime};
/// Cubic animation curve.
fn cubic(time: EasingTime) -> EasingStep {
let f = time.fct();
f * f * f
}
Note that all the common easing functions are implemented in easing
.
Aliased Type§
struct EasingStep(pub f32);
Fields§
§0: f32