all parms random randomize randomize_vs_shuffle total
There are main 3 ways for randomizing, a sequence (random), an option (randomly) and an action (randomize)
The sequence 'random'
|
HTML
|
RESULT
|
{sequence random, rows=25, minimal=10, maximal=50 } {$sequence} {/sequence}
|
12 35 42 18 43 38 17 14 10 26 17 35 19 39 23 44 14 47 17 18 12 41 35 21 47
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
12 30 18 16 15 14 26 50 28 27 23 43 33 10 42 20 25 17 32 49 11 21 22 47 24
|
The sequence option 'randomly'
Here the loop index is randomly set before the sequence is executed.
|
HTML
|
RESULT
|
{sequence power=2, rows=10, randomly, from=8, to=16} {$sequence} {/sequence}
|
8192 1024 256 4096 8192 4096 512 1024 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
577 457 151 853 967 7 449 709 613 919
|
The sequence action 'randomize'
|
HTML
|
RESULT
|
{sequence from=10, to=20, push='mySeq'}
|
|
{mySeq} {$sequence} {/mySeq}
|
10 11 12 13 14 15 16 17 18 19 20
|
{mySeq randomize } {$sequence} {/mySeq}
|
10 19 11 15 18 12 17 13 16 14 20
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
16 13 14 20 18
|
|