Skip to main content

pick_closest

Function pick_closest 

Source
pub fn pick_closest(x: f64, lo: f64, hi: f64) -> f64
Expand description

Pick whichever of lo / hi is nearer to x by absolute distance. Ties resolve to lo (the floor), per the closest_* contract.