Scaling Functions
Scaling functions are used to scale a value from one range to another.
Clamp
The clamp function is used to limit a value to a range.
clamp(value, min, max);
Parameters
| value | The value to be clamped |
| min | The minimum value |
| max | The maximum value |
Map range
The map range function is used to map a value from one range to another.
mapRange(value, min1, max1, min2, max2);
Parameters
| value | The value to be mapped |
| min1 | The minimum value of the first range |
| max1 | The maximum value of the first range |
| min2 | The minimum value of the second range |
| max2 | The maximum value of the second range |