Skip to main content

spring_curve

Function spring_curve 

Source
pub fn spring_curve(
    time: f32,
    initial_value: f32,
    target_value: f32,
    angular_freq: f32,
    damping_ratio: f32,
) -> f32
Expand description

Oscillating spring curve: x(t) = A * e^(-ζωt) * cos(ωd*t + φ)