The minimum integer value (inclusive).
The maximum integer value (inclusive or exclusive based on maxExclusive
).
If true
, the max
value is exclusive; otherwise, it is inclusive. Defaults to false
.
A random integer between min
(inclusive) and max
(exclusive if maxExclusive
is true
, inclusive otherwise).
maxExclusive
is true
, the result is in the range [min, max)
.maxExclusive
is false
, the result is in the range [min, max]
.min
and max
are rounded to the nearest integer using Math.ceil
and Math.floor
respectively.
Generates a random integer between the specified
min
andmax
values.