integer static method

int integer({
  1. int min = -2147483647,
  2. int max = 2147483647,
})

Get an integer between min and max (inclusive).

Min and max must be less than abs(2^31-1), and max must be greater than min.

Implementation

static int integer({int min = -2147483647, int max = 2147483647}) {
  return random.nextInt(max + 1 - min) + min;
}