Difference between revisions of "Core.randomSeed"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2017.9<br/> === Description === Set the current seed of the specified random number generator. <source lang="lua"> (), = Core.randomSe...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
 
 
'''Available since:''' Gideros 2017.9<br/>
 
'''Available since:''' Gideros 2017.9<br/>
 +
'''Class:''' [[Core]]<br/>
 +
 
=== Description ===
 
=== Description ===
 
Set the current seed of the specified random number generator.
 
Set the current seed of the specified random number generator.
<source lang="lua">
+
 
(), = Core.randomSeed(generatorseed,)
+
<syntaxhighlight lang="lua">
</source>
+
() = Core.randomSeed(generator,seed)
'''generator:''' (number) PRNG algorithm to use, use 0 for default engine (MT19937) '''optional'''<br/>
+
</syntaxhighlight>
'''seed:''' (number) Seed for that generator '''optional'''<br/>
+
 
 +
=== Parameters ===
 +
'''generator''': (number) PRNG algorithm to use, use 0 for default engine (MT19937) '''optional'''<br/>
 +
'''seed''': (number) Seed for that generator '''optional'''<br/>
 +
 
 +
=== Return values ===
 
'''Returns''' () A seed usable for later resuming the RNG<br/>
 
'''Returns''' () A seed usable for later resuming the RNG<br/>
 +
 +
 +
{{Core}}

Latest revision as of 14:26, 13 July 2023

Available since: Gideros 2017.9
Class: Core

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