[−][src]Function helium::math::map
pub fn map(
val: f32,
cur_start: f32,
cur_end: f32,
target_start: f32,
target_end: f32
) -> f32
Maps a value from one range to another.
Examples
let val = 8.0; let mapped = helium::math::map(val, 0.0, 10.0, 0.0, 100.0); assert_eq!(80.0, mapped);