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 15 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.39476, 0.26770, 0.99314, 0.33883, 0.95312, 0.72226, 0.12689, 0.74167, 0.58323, 0.69559