ui/slider.rs#
Source: lib/ui/slider.rs
impl Range
fn position(&self, value: i32, travel: i32) -> i32Map a value to the slider's usable pixel travel. RG_LOG applies to positive, increasing bounds; all other bounds use linear mapping. Degenerate ranges or travel return zero. Values outside the range are clamped.fn value_at(&self, position: i32, travel: i32) -> i32Map pixel travel to the nearest integer value, before step snapping. The logarithmic inverse uses bounded binary search (at most 31 iterations). Keyboard steps and semantic values always remain in the original units.