aa_macro syntax 
 aa_macro source 
 HTML source 
 HTML render 
Key

§ 4.88 - [random] Built-In

Mnemonic aid: random for RANDOM number

See also:  [abs] ,  [add] ,  [dec] ,  [div] ,  [inc] ,  [int] ,  [max] ,  [min] ,  [mul] ,  [random] ,  [round] ,  [stage]  and  [sub] 

A value between zero and one, inclusive, is returned. This number is pseudo-random. The number is generated by the Mersenne Twister. It produces 53-bit precision floats and has a period of 2**19937-1.

If you provide a seed (other than the reserved word none), this will seed the random number generator such that the sequence, while extremely varied, will be repeatable on a per-use basis. If you use none as the seed, that will seed the generator from the system clock, and the sequence will vary per each use. The seed may be any string of characters.

Examples:


[random (seed=none,)(icount=N)]

[style rrange [int [mul mode=float,[b] [random]]]]
[random]
[random seed=testing]
[random seed=testing,icount=3]
{rrange 10}
{rrange 50}
{rrange 100}

0.749975723153
0.941838657507
0.0673305554027
2
7
94
0.749975723153 0.941838657507 0.0673305554027 2 7 94
Keyboard Navigation
, Previous Page . Next Page t TOC i Index

Valid HTML 4.01 Loose
 

This manual was generated with wtfm
wtfm uses aa_macro and SqLite
aa_macro uses Python 2.7