Random(
range
)
A random number inside the given range.
Example 1
Example
=
Paragraph
{
var
odds
=
Math
.
Random
(1
..
20);
"The odds of success are
{0}
out of 20"
(
odds
);
};
The odds of success are 12 out of 20
Example 2
Example2
=
Block
{
Paragraph
{
Bold
;
"Ten random numbers between 0 and 1"
;
};
Paragraph
{
TextDigits
:
5;
Separator
:
CommaSpace
;
foreach
(
var
i
in
1
..
10)
Math
.
Random
(0.0
..
1.0);
};
};
Ten random numbers between 0 and 1
0.79026, 0.32475, 0.15031, 0.39776, 0.61333, 0.30153, 0.84811, 0.19428, 0.54274, 0.02519