intInRange static method

int intInRange(
  1. int min,
  2. int max
)

Gives an int in the given range from min (inclusive) to max (inclusive)

Implementation

static int intInRange(int min, int max) {
  if (min > max) {
    int i = max;
    max = min;
    min = i;
  }
  return min + _getRandom().nextInt(max-min+1);
}