Added new example that shows the usage of random_int() and random_seed(). Related parser fixes. (0.37.6)
This commit is contained in:
parent
40584f27f5
commit
4039abd10d
4 changed files with 91 additions and 9 deletions
|
|
@ -45,9 +45,9 @@ print(max(5, 9)) // -> 9
|
|||
print(clamp(15, 0, 10)) // -> 10
|
||||
print(abs(-7)) // -> 7
|
||||
print(pow(2, 8)) // -> 256
|
||||
random(123) // seed RNG
|
||||
print(randomInt(0, 3)) // -> 0..2 (deterministic for seed 123)
|
||||
print(randomInt(5, 6)) // -> 5
|
||||
random_seed(123) // seed RNG
|
||||
print(random_int(0, 3)) // -> 0..2 (deterministic for seed 123)
|
||||
print(random_int(5, 6)) // -> 5
|
||||
|
||||
/* Expected output:
|
||||
a-b-c
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue