Difference between revisions of "RandomGenerator"

m (Temporarily made newin 0.9.0 functions visible)
m (Added missing prettysince/prettyremoved fields)
Line 6: Line 6:
 
| headers=hide
 
| headers=hide
 
| default=None.
 
| default=None.
 +
| format=template
 +
| template=ListingFields
 +
| introtemplate=ListingIntro
 +
| outrotemplate=ListingOutro
 
| ?Description
 
| ?Description
 +
| ?PrettySince
 +
| ?PrettyRemoved
 
}}
 
}}
 
== Functions ==
 
== Functions ==
 
{{#ask: [[Category:Functions]] [[parent::RandomGenerator||Object]]
 
{{#ask: [[Category:Functions]] [[parent::RandomGenerator||Object]]
 
| headers=hide
 
| headers=hide
 +
| format=template
 +
| template=ListingFields
 +
| introtemplate=ListingIntro
 +
| outrotemplate=ListingOutro
 
| ?Description
 
| ?Description
 +
| ?PrettySince
 +
| ?PrettyRemoved
 
}}
 
}}
 
== Supertypes ==
 
== Supertypes ==

Revision as of 01:51, 17 June 2013

Available since LÖVE 0.9.0
This type is not supported in earlier versions.

A random number generation object that has a independent random state.

Constructors

love.math.newRandomGenerator Creates a new RandomGenerator object. Added since 0.9.0

Functions

Object:release Immediately destroys the object's Lua reference. Added since 11.0
Object:type Gets the type of the object as a string.
Object:typeOf Checks whether an object is of a certain type.
RandomGenerator:getSeed Gets the seed of the random number generator. Added since 0.9.0
RandomGenerator:getState Gets the current state of the random number generator. Added since 0.9.1
RandomGenerator:random Generates a pseudo-random number in a platform independent manner. Added since 0.9.0
RandomGenerator:randomNormal Get a normally distributed pseudo random number. Added since 0.9.0
RandomGenerator:setSeed Sets the seed of the random number generator. Added since 0.9.0
RandomGenerator:setState Sets the current state of the random number generator. Added since 0.9.1

Supertypes

Object

See Also

Other Languages