lower and upper - lower are the location and scale parameters, respectively. Preconditions:
lower < upper (otherwise an IllegalArgumentException is thrown.)Algorithm Description: scales the output of Random.nextDouble(), but rejects 0 values (i.e., will generate another random double if Random.nextDouble() returns 0). This is necessary to provide a symmetric output interval (both endpoints excluded).
@param lower the lower bound. @param upper the upper bound. @return a uniformly distributed random value from the interval (lower,upper) @throws NumberIsTooLargeException if {@code lower >= upper}.Algorithm Description: scales the output of Random.nextDouble(), but rejects 0 values (i.e., will generate another random double if Random.nextDouble() returns 0). This is necessary to provide a symmetric output interval (both endpoints excluded).
| |
| |
| |
| |
| |