a library to speed up the development of Fivem scripts and frameworks
fivem-ts - Documentation v0.7.5 • Docs
fivem-ts - Documentation v0.7.5 / Shared / mapRange
mapRange(
value
,inMin
,inMax
,outMin
,outMax
):number
Maps a value from one range to another.
• value: number
The value to map.
• inMin: number
The minimum value of the input range.
• inMax: number
The maximum value of the input range.
• outMin: number
The minimum value of the output range.
• outMax: number
The maximum value of the output range.
number
The mapped value.
mapRange(5, 0, 10, 0, 100); // 50