java.lang.Objectobjectdraw.RandomDoubleGenerator
public class RandomDoubleGenerator
A RandomDoubleGenerator
will produce a string of random double
s that
are in the range it was created to produce. Each number x will satisfy
min <= x < max
, and the numbers will be distributed evenly and unpredictably
within that range.
You can think of the generator as being like a set of dice, which I can roll over and over
again (with nextValue()
) to get different results each time. So, if I construct
a new RandomIntGenerator(1, 10)
it might produce 8.341, then 1.792, and so on.
Constructor Summary | |
---|---|
RandomDoubleGenerator(double min,
double max)
Construct a random number generator that will deliver double s in the given
range. |
Method Summary | |
---|---|
double |
nextValue()
Return another random number |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomDoubleGenerator(double min, double max)
double
s in the given
range.
min
- Minimum value that may be producedmax
- Maximum value that may be producedMethod Detail |
---|
public double nextValue()