Available since LÖVE 0.9.0
This function is not supported in earlier versions.
Generates a pseudo-random number in a platform independent manner.
Get uniformly distributed pseudo-random number within [0, 1].
number = RandomGenerator:random( )
None.
number number
Get uniformly distributed pseudo-random integer number within [1, max].
number = RandomGenerator:random( max )
number max
number number
Get uniformly distributed pseudo-random integer number within [min, max].
number = RandomGenerator:random( min, max )
number min
number max
number number
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/RandomGenerator:random