randi
(n:
number
)
:
number
rand() but floored to integer.
randi
(
10
)
// returns 0 to 9
randi
(a:
number
, b:
number
)
:
number
rand() but floored to integer.
randi
(
0
,
3
)
// returns 0, 1, or 2
randi
()
:
number
rand() but floored to integer.
randi
()
// returns either 0 or 1