{{newin|[[0.9.0]]|090|type=function}}
Generates a pseudo-random number in a platform independent manner.

== Function ==
Get uniformly distributed pseudo-random number within [0, 1].
=== Synopsis ===
<source lang="lua">
number = RandomGenerator:random( )
</source>
=== Arguments ===
None.
=== Returns ===
{{param|number|number|The pseudo-random number.}}

== Function ==
Get uniformly distributed pseudo-random integer number within [1, max].
=== Synopsis ===
<source lang="lua">
number = RandomGenerator:random( max )
</source>
=== Arguments ===
{{param|number|max|The maximum possible value it should return.}}
=== Returns ===
{{param|number|number|The pseudo-random integer number.}}
== Function ==
Get uniformly distributed pseudo-random integer number within [min, max].
=== Synopsis ===
<source lang="lua">
number = RandomGenerator:random( min, max )
</source>
=== Arguments ===
{{param|number|min|The minimum possible value it should return.}}
{{param|number|max|The maximum possible value it should return.}}
=== Returns ===
{{param|number|number|The pseudo-random integer number.}}

== See Also ==
* [[parent::RandomGenerator]]
* [[love.math.random]]
* [[love.math]]
[[Category:Functions]]
{{#set:Description=Generates a pseudo-random number in a platform independent manner.}}
== Other Languages ==
{{i18n|RandomGenerator:random}}