# math.bound

Syntax

n := math.bound(nlower,nval,nupper)

Get a bounded value.

Returns the number nval constrained to fall between nlower and nupper (inclusive). If nval is less than nlower the return value is nlower. If nval is greater than nupper the return value is nupper.

If the values are vectors, then the operation is performed on each component of the vectors separately.

Returns: n - the bound value nlower - the lower range of allowed values nval - the value being checked nupper - the upper range of allowed values