map(value, istart, istop, ostart, ostop)

Re-maps a number from one range to another. Numbers outside the range are not clamped to 0 and 1, because out-of-range values are often intentional and useful.

Type: function

Parameter(s):

  • value {Number}:

    The value to be mapped.

  • istart {Number}:

    The start of the input range.

  • istop {Number}:

    The end of the input range.

  • ostart {Number}:

    The start of the output range.

  • ostop {Number}:

    The end of the output range.

Returns:

  • {Number}:

    The mapped value.