Skip to main content

damp

Function damp 

Source
pub fn damp(current: f32, target: f32, lambda: f32, dt: f32) -> f32
Expand description

Frame-rate independent exponential smoothing. Larger lambda is snappier; call every frame with the frame’s dt: x = damp(x, target, 8.0, ctx.dt()).