The source range passed to math.remap is now considered properly. The mistake is only obvious with a non-zero source range low value, which is why is probably wasn't noticed before.
-- Before (wrong)
print(math.remap(15, 10, 20, 80, 90)) -- 95.0
-- After
print(math.remap(15, 10, 20, 80, 90)) -- 85.0
Also added math.remapClamp, which is similar to math.remap but the value returned is clamped to the destination range, even if the input value is beyond the source range.
The source range passed to math.remap is now considered properly. The mistake is only obvious with a non-zero source range low value, which is why is probably wasn't noticed before.
-- Before (wrong) print(math.remap(15, 10, 20, 80, 90)) -- 95.0
-- After print(math.remap(15, 10, 20, 80, 90)) -- 85.0
Also added math.remapClamp, which is similar to math.remap but the value returned is clamped to the destination range, even if the input value is beyond the source range.