doubleInRange static method

double doubleInRange(
  1. double min,
  2. double max
)

Gives a double in the given range from min (inclusive) to max (inclusive)

Implementation

static double doubleInRange(double min, double max) {
  if (min > max) {
    double i = max;
    max = min;
    min = i;
  }
  return min + _getRandom().nextDouble() * (max-min).abs();
}