~/forever/addon-api/function/math.remap
math.remap
documented function · LuaMathExtensions
math.remap(value, sourceMinimum, sourceMaximum, destinationMinimum, destinationMaximum) : remappedValueMaps a value from one range to the corresponding position in another range.
──ARGUMENTS
- value
- number (The value to map.)
- sourceMinimum
- number (The lower endpoint of the source range.)
- sourceMaximum
- number (The upper endpoint of the source range.)
- destinationMinimum
- number (The lower endpoint of the destination range.)
- destinationMaximum
- number (The upper endpoint of the destination range.)
──RETURNS
- remappedValue
- number (The mapped value. Values outside the source range are extrapolated beyond the destination range.)
──DETAILS
- Secret Arguments
- AllowedWhenUntainted
──VERSION HISTORY
Present since at least 1.60.1.70707, the first build we track.