num.js
- Source
Methods
(static) clamp(number, min, max) → {number}
Keep a number between a min and a max value
Parameters:
Name | Type | Description |
---|---|---|
number | number | The number to clamp |
min | number | The minimum value |
max | number | The maximum value |
- Source
Returns:
the clamped number
- Type:
- number