maxAdd(value, amount, max) → {number}
Adds the given amount to the value, but never lets the value go over the specified maximum.
Parameters
Name | Type | Description |
---|---|---|
value | number | The value to add the amount to. |
amount | number | The amount to add to the value. |
max | number | The maximum the value is allowed to be. |
Returns
number -
The new value.
- Source code: math/Math.js (Line 491)
Please login to continue.