Skip to main content

spring_towards

Function spring_towards 

Source
pub fn spring_towards(
    current: f32,
    velocity: &mut f32,
    target: f32,
    stiffness: f32,
    dt: f32,
) -> f32
Expand description

Critically-damped spring toward target (avoids overshoot)