Overview
This function returns a value constrained between a minimum and maximum. If the value is lower than the minimum, the minimum is returned, and if the input is higher than the maximum, the maximum is returned.Parameters
- Value: The number to constrain within the specified minimum and maximum range.
- Pro tip: Use an Expression Editor property, like
Pan.translationY, as the value to follow a user’s gesture, then clamp it to keep the result within a defined range.
- Pro tip: Use an Expression Editor property, like
- Min: The value at the start of the range. The function cannot return a value lower than this.
- Max: The value at the end of the range. The function cannot return a value higher than this.
Example
11 (the true value).
0 (the min value).
20 (the max value).
