Function rustduino::math::map [−][src]
pub fn map(
val: u64,
in_min: u64,
in_max: u64,
out_min: u64,
out_max: u64
) -> u64
Expand description
Maps a number from one data type to the another data type in a uniform ratio scale.
Arguments
val
- a u64, the value which is to be mapped to any other data type.in_min
- a u64, the minimum value possible in the data type ofval
.in_max
- a u64, the maximum value possible in the data type ofval
.out_min
- a u64, the minimum value possible in the required data type forval
.out_max
- a u64, the maximum value possible in the required data type forval
.
Returns
a u64
- the final value ofval
in the required data type.