Methods
min(value, minValue) → {*}
Checks if a value is larger than a minimum and returns the value or the lower bound respectively.
Accepts all values comparable with >.
Parameters:
Name | Type | Description |
---|---|---|
value |
* | the value to check |
minValue |
* | the lower bound |
Returns:
value or minValue
- Type
- *
Example
let croppedVal = min(value, 0);