randomDouble static method

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

Generates a random double between min and max

Example:

Helpers.randomDouble(0.0, 1.0); // Random number between 0.0 and 1.0

Implementation

static double randomDouble(double min, double max) {
  return Random().nextDouble() * (max - min) + min;
}