{{newin|[[0.9.0]]|090|type=function}}
Creates a new [[RandomGenerator]] object which is completely independent of other RandomGenerator objects and random functions.

== Function ==
=== Synopsis ===
<source lang="lua">
rng = love.math.newRandomGenerator( )
</source>
=== Arguments ===
None
=== Returns ===
{{param|RandomGenerator|rng|The new Random Number Generator object.}}

== Function ==
=== Synopsis ===
<source lang="lua">
rng = love.math.newRandomGenerator( seed )
</source>
=== Arguments ===
{{param|number|seed|The initial seed number to use for this object.}}
=== Returns ===
{{param|RandomGenerator|rng|The new Random Number Generator object.}}
=== Notes ===
See [[RandomGenerator:setSeed]].

== Function ==
=== Synopsis ===
<source lang="lua">
rng = love.math.newRandomGenerator( low, high )
</source>
=== Arguments ===
{{param|number|low|The lower 32 bits of the seed number to use for this object.}}
{{param|number|high|The higher 32 bits of the seed number to use for this object.}}
=== Returns ===
{{param|RandomGenerator|rng|The new Random Number Generator object.}}
=== Notes ===
See [[RandomGenerator:setSeed]].

== Examples ==
Creates a new RandomGenerator object, then generates a number between 1 and 100 inclusive.
<source lang="lua">
function love.load()
	rng = love.math.newRandomGenerator()
	randomNumber = rng:random(1,100)
end
</source>
== See Also ==
* [[parent::love.math]]
* [[Constructs::RandomGenerator]]
[[Category:Functions]]
{{#set:Description=Creates a new [[RandomGenerator]] object.}}
== Other Languages ==
{{i18n|love.math.newRandomGenerator}}