MapRange Op

MapRange

Maps a value from one range into another.


<p>changes a number&#39;s relative value by mapping within one range to the equivalent position in another range. For example, given the range of 0 to 100, 50 would be halfway between. so if it were mapped to a range of 0 to 50, it would be 25 (because 25 is exactly half that range).</p>


Full Name
  • Ops.Math.MapRange
Visibility
  • Core Op - Official cables op
License
  • MIT
AuthorgithubTest Patches


Example Patch maprange

Open In Editor

Youtube Video Tutorial

INPUT PORTS


value (Number)

<p>The value you want to map</p>

Input Range

old min (Number)

<p>The minimum of the old range</p>

old max (Number)

<p>The maximum of the old range</p>

Output Range

new min (Number)

<p>The minimum of the new range</p>

new max (Number)

<p>The maximum of the new range</p>

Easing index (Number:

<i>integer</i>

)

Clamp (Number:

<i>boolean</i>

)

OUTPUT PORTS


result (Number)

<p>Result of the mapping</p>


Patches using MapRange

  • Examples
  • Public
  • My Patches

Changelog


improvementadjusted default valuesuser avatarpandur - 2024-01-11 13:59
featureadded option to turn off clamping, so values can be bigger then the specified min/max input rangeuser avatarpandur - 2024-02-02 15:55