Skip to main content

within

Function within 

Source
fn within(value: f64, low: f64, high: f64, otherwise: f64) -> f64
Expand description

value held to low..=high, or otherwise when that range is empty.

Not f64::clamp alone, which panics when low > high or either is NaN – and a compositor that panics takes the session with it. Tiling::room always includes the current ratio, so its range is empty only when that ratio is itself NaN; otherwise is then the seam left as it was.