What it does
math.randomInt takes min and max.
Signature
math.randomInt(min, max)Arguments
minmax
Example · generated
function update(dt) { math.randomInt(0, 1);}math.randomInt is called with values of the shape its signature asks for. The code sits in update(dt), which the engine calls every frame: dt is the time since the last one, in seconds.