love.math.setRandomState

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

Sets the current state of the random number generator. The value used as an argument for this function is an opaque implementation-dependent string and should only originate from a previous call to love.math.getRandomState.

This is different from love.math.setRandomSeed in that setRandomState directly sets the random number generator's current implementation-dependent state, whereas setRandomSeed gives it a new seed value.

Function

Synopsis

love.math.setRandomState( state )

Arguments

string state
The new state of the random number generator, represented as a string. This should originate from a previous call to love.math.getRandomState.

Returns

Nothing.

Notes

The effect of the state string does not depend on the current operating system.

See Also

Other Languages