{{newin|[[0.9.1]]|091|type=function}}
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 ===
<source lang="lua">
love.math.setRandomState( state )
</source>
=== Arguments ===
{{param|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 ==
* [[parent::love.math]]
* [[love.math.getRandomState]]
[[Category:Functions]]
{{#set:Description=Sets the current state of the random number generator.}}
== Other Languages ==
{{i18n|love.math.setRandomState}}