pierro 0.1.0

An immediate mode UI library for Rust
Documentation
1
2
3
4
5
6
7
use super::Range;


pub fn map(val: f32, from: Range, to: Range) -> f32 {
    let t = (val - from.min) / (from.max - from.min);
    t * (to.max - to.min) + to.min
}