On this page
math.random
Returns a uniformly distributed real number between the two bounds after ordering them from low to high.
Syntax
Atlas Script
math.random(min, max)Parameters
min- Lower bound for the calculation or generated value.
max- Upper bound for the calculation or generated value.
Return value
Returns a uniformly distributed real number between the two bounds after ordering them from low to high.
Remarks
Returns a uniformly distributed real number between the two bounds after ordering them from low to high. Do not rely on the upper endpoint being included.
Examples
Usage pattern
// Replace min, max with values described above.
math.random(min, max);