Difference between revisions of "love.math.random"
m |
m |
||
Line 36: | Line 36: | ||
* [[love.math.randomseed]] | * [[love.math.randomseed]] | ||
* [[love.math.randomnormal]] | * [[love.math.randomnormal]] | ||
+ | * [[love.math.newRandomGenerator]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
{{#set:Description=Get uniformly distributed pseudo random number}} | {{#set:Description=Get uniformly distributed pseudo random number}} | ||
== Other Languages == | == Other Languages == | ||
{{i18n|love.math.random}} | {{i18n|love.math.random}} |
Revision as of 00:15, 30 May 2013
Available since LÖVE 0.9.0 |
This function is not supported in earlier versions. |
Generates a pseudo random number in a platform independent way.
Contents
Function
Get uniformly distributed pseudo random number in [0,1].
Synopsis
number = love.math.random( )
Arguments
None.
Returns
number number
- The pseudo random number.
Function
Get uniformly distributed pseudo random number in [0,max]
Synopsis
number = love.math.random( max )
Arguments
number max
- The maximum possible value it should return.
Returns
number number
- The pseudo random number.
Function
Get uniformly distributed pseudo random number in [min, max].
Synopsis
number = love.math.random( min, max )
Arguments
number min
- The minimum possible value it should return.
number max
- The maximum possible value it should return.
Returns
number number
- The pseudo random number.
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