Skip to main content

snap

Function snap 

Source
pub fn snap(v: f64, step: f64) -> f64
Expand description

Snap v to the nearest multiple of step (step <= 0 returns v).