randDouble static method

double randDouble(
  1. double max
)

Generates a non-negative random floating point value uniformly distributed in the range from 0.0, inclusive to max exclusive

Implementation

static double randDouble(double max) {
  return _random.nextDouble() * max;
}