Skip to main content

slider_percent

Function slider_percent 

Source
pub fn slider_percent(value: f32, min: f32, max: f32) -> f32
Expand description

Project value into [0, 100] against [min, max]. Clamps so out-of-range values pin to the endpoints; if min == max the value projects to 0% to avoid divide-by-zero.