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.94431, 0.72965, 0.71036, 0.39855, 0.26996, 0.30459, 0.39364, 0.66991, 0.49665, 0.94319