Difference between revisions of "Rnd"

From MiniScript Wiki
Jump to navigation Jump to search
Line 5: Line 5:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Parameter Name !! Default Value !! Meaning
+
! Parameter Name !! Type !! Meaning
 
|-
 
|-
 
| ''seed'' || number, optional || if given, reset the sequence with this value.
 
| ''seed'' || number, optional || if given, reset the sequence with this value.

Revision as of 03:39, 31 July 2020

rnd generates a pseudorandom number between 0 and 1 (including 0 but not including 1).

Arguments

Parameter Name Type Meaning
seed number, optional if given, reset the sequence with this value.

Usage Notes

If given a seed, then the generator is reset with that seed value, allowing you to create repeatable sequences of random numbers. If you never specify a seed, then it is initialized automatically, generating a unique sequence on each run.