integer function
return an integer between min
to max
.
min
, max
and max
-min
should between -9223372036854775807 to 9223372036854775807.
Implementation
int integer({int min = 0, int max = maxInteger}) {
return (_random.nextDouble() * (max - min) + min).round();
}