Difference between revisions of "love.math.newRandomGenerator"
m |
|||
Line 5: | Line 5: | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | rng = love. | + | rng = love.math.newRandomGenerator( ) |
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
Line 16: | Line 16: | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | rng = love. | + | rng = love.math.newRandomGenerator( state ) |
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
Line 27: | Line 27: | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | rng = love. | + | rng = love.math.newRandomGenerator( low, high ) |
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
Line 41: | Line 41: | ||
{{#set:Description=Creates a new [[RandomGenerator]] object.}} | {{#set:Description=Creates a new [[RandomGenerator]] object.}} | ||
== Other Languages == | == Other Languages == | ||
− | {{i18n|love. | + | {{i18n|love.math.newRandomGenerator}} |
Revision as of 15:01, 7 October 2013
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.
Contents
Function
Synopsis
rng = love.math.newRandomGenerator( )
Arguments
None
Returns
RandomGenerator rng
- A Random Number Generator object.
Function
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
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
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