Skip to main content

sampled_easing

Function sampled_easing 

Source
pub fn sampled_easing(
    config: SpringConfig,
    epsilon: f32,
) -> (Duration, impl Fn(f32) -> f32)
Expand description

Adapts a spring starting at zero with no velocity to GPUI’s duration-based easing API.

The returned easing can overshoot the normalized 0..1 output range. Retargeting this duration-based form restarts the spring; use SpringConfig::step when preserving velocity matters.