Difference between revisions of "Core.randomSeed"

From GiderosMobile
m
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
Set the current seed of the specified random number generator.
 
Set the current seed of the specified random number generator.
  
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
() = Core.randomSeed(generator,seed)
 
() = Core.randomSeed(generator,seed)
</source>
+
</syntaxhighlight>
  
 
=== Parameters ===
 
=== Parameters ===

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