Difference between revisions of "love.math.setRandomState"
(moved love.math.setRandomState to love.math.setRandomSeed: Renamed) |
(Created page) |
||
Line 1: | Line 1: | ||
− | + | {{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}} |
Latest revision as of 00:00, 5 May 2019
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
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info