rand(times)

Randomly clears times number of cells in the quadrille. Same as rand(times, null).

Example

(numeric keys define times; mouse click randomly clears times number of cells)

edit, then run

Note

For deterministic (repeatable) randomness, explicitly call randomSeed(seed) before rand(times).

Syntax

rand(times)

Parameters

Param Description
times Number: number of cells to clear at random
What this page's examples use
p5.quadrille
drawQuadrille createQuadrille cellLength rand order
p5.js
createCanvas background key createP html

Names the analysis can prove are called, and the line each one is documented on. Local variables and members of an unknown receiver are left out.