🧮 Generates a random number within a symmetric range around zero.
Can be used to create a jitter effect (random displacement).
Equivalent to random(-amount, amount).
random(-amount, amount)
Optional
absolute maximum amount of jitter, default is 1
random number between -val and val
q5.draw = function () { circle(mouseX + jit(3), mouseY + jit(3), 5);}; Copy
q5.draw = function () { circle(mouseX + jit(3), mouseY + jit(3), 5);};
await Canvas(200);q5.draw = function () { circle(jit(50), 0, random(50));}; Copy
await Canvas(200);q5.draw = function () { circle(jit(50), 0, random(50));};
🧮 Generates a random number within a symmetric range around zero.
Can be used to create a jitter effect (random displacement).
Equivalent to
random(-amount, amount).