love.math.newRandomGenerator

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Creates a new RandomGenerator object which is completely independent of other RandomGenerator objects and random functions.

Function

Synopsis

rng = love.math.newRandomGenerator( )

Arguments

None

Returns

RandomGenerator rng
A Random Number Generator object.

Function

See RandomGenerator:setState.

Synopsis

rng = love.math.newRandomGenerator( state )

Arguments

number state
The state ("seed") number to use for this instance of the object.

Returns

RandomGenerator rng
A Random Number Generator object.

Function

See RandomGenerator:setState.

Synopsis

rng = love.math.newRandomGenerator( low, high )

Arguments

number low
The lower 32 bits of the state number to use for this instance of the object.
number high
The higher 32 bits of the state number to use for this instance of the object.

Returns

RandomGenerator rng
A Random Number Generator object.

See Also

Other Languages