Name | constrain |
||||||
---|---|---|---|---|---|---|---|
Examples |
draw <- function() { background(204) mx = constrain(mouseX, 30, 70) rect(mx - 10, 40, 20, 20) } | ||||||
Description | Constrains a value to not exceed a maximum and minimum value. | ||||||
Syntax | constrain( | ||||||
Parameters |
| ||||||
Related |
max min |
Cover
Reference
Tutorials
Bugs