Remap extension

on

Methods

isWithinRange(num from, num to) bool
Returns whether a number is within a given range.
remap(num fromLow, num fromHigh, num toLow, num toHigh) double
Re-maps a number from one range to another. That is, a value of fromLow would get mapped to toLow, a value of fromHigh to toHigh, values in-between to values in-between, etc.
remapAndClamp(num fromLow, num fromHigh, num toLow, num toHigh) num
Same as remap, however the result is being constrained to the range toLow-toHigh.