clamp(v, min, max) → {number}
Force a value within the boundaries by clamping it to the range min, max.
Parameters
| Name | Type | Description |
|---|---|---|
v | float | The value to be clamped. |
min | float | The minimum bounds. |
max | float | The maximum bounds. |
Returns
number -
The clamped value.
- Source code: math/Math.js (Line 1028)
Please login to continue.