This example demonstrates the use of the random() function.
When the user presses the mouse button, the position and color of the circle change randomly.
No alt text
Linear Interpolation
Convert a number between 0 and 1 to another range.
Map
Convert a number from one range to another range.
Random
Get random numbers.
Constrain
Keep a number within a range.
Clock
Get the current time.
Looking for the old p5.js site? Find it here!