constrain()
Math / CalculationDescription
Constrains a value to not exceed a maximum and minimum value.
Syntax
float constrain(float v, float lo, float hi)
Parameters
| Name | Type | Description |
|---|---|---|
| v | float | the value to constrain |
| lo | float | minimum limit |
| hi | float | maximum limit |
Returns
floatRelated
Under the Hood
Implementation in Processing.h / Processing.cpp:
Loading...