Difference between revisions of "Core.randomSeed"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Available since:''' Gideros 2017.9<br/>
+
'''<translate>Available since</translate>:''' Gideros 2017.9<br/>
=== Description ===
+
=== <translate>Description</translate> ===
 
<translate>Set the current seed of the specified random number generator.</translate>
 
<translate>Set the current seed of the specified random number generator.</translate>
 
<source lang="lua">
 
<source lang="lua">
 
() = Core.randomSeed(generator,seed)
 
() = Core.randomSeed(generator,seed)
 
</source>
 
</source>
=== Parameters ===
+
=== <translate>Parameters</translate> ===
 
'''generator''': (number) <translate>PRNG algorithm to use, use 0 for default engine (MT19937)</translate> '''optional'''<br/>
 
'''generator''': (number) <translate>PRNG algorithm to use, use 0 for default engine (MT19937)</translate> '''optional'''<br/>
 
'''seed''': (number) <translate>Seed for that generator</translate> '''optional'''<br/>
 
'''seed''': (number) <translate>Seed for that generator</translate> '''optional'''<br/>
=== Return values ===
+
=== <translate>Return values</translate> ===
'''Returns''' () <translate>A seed usable for later resuming the RNG</translate><br/>
+
'''<translate>Returns</translate>''' () <translate>A seed usable for later resuming the RNG</translate><br/>

Revision as of 07:26, 24 August 2018

Available since: Gideros 2017.9

Description

Set the current seed of the specified random number generator.

() = Core.randomSeed(generator,seed)

Parameters

generator: (number) PRNG algorithm to use, use 0 for default engine (MT19937) optional
seed: (number) Seed for that generator optional

Return values

Returns () A seed usable for later resuming the RNG