LIMIT
Limit a number to be within the provided range; if less than the minimum, return the minimum, or if greater than the maximum return the maximum
Example Usage
LIMIT(1.5, 2, 5) -> 2
LIMIT(2.5, 2, 5) -> 2.5
LIMIT(7, 2, 6) -> 5
Overview
Function signature
LIMIT(value, minimum, maximum)
Category
Math
Return data type
float
Arguments
Name | DataType | List Options | Description |
---|---|---|---|
value | float | The value to be limited | |
minimum | float | The minimum on the limit range; if value is below this, minimum is returned | |
maximum | float | The maximum on the limit range; if value is greater than this, maximum is returned |