All Packages Class Hierarchy This Package Previous Next Index
Class utils.RandNums
java.lang.Object
|
+----utils.RandNums
- public class RandNums
- extends Object
A simple random-number utility, created to shorten random-number
function calls in programs
-
RandNums()
-
-
rand()
- return random number n,
such that 0 <= n < Integer.MAX_VALUE.
-
randIntRange(int, int)
- return random number n, such that low <= n <= high,
even if low > high.
-
setSeed(long)
- "seed" the Random Number Generator (RNJ) with 'arg'.
RandNums
public RandNums()
setSeed
public static void setSeed(long seed)
- "seed" the Random Number Generator (RNJ) with 'arg'. You can
make the RNJ repeatedly produce _exactly_ the same sequence
of pseudorandom numbers by seeding and reseeding it with the
same value - useful for debugging!
rand
public static int rand()
- return random number n,
such that 0 <= n < Integer.MAX_VALUE.
randIntRange
public static int randIntRange(int low,
int high)
- return random number n, such that low <= n <= high,
even if low > high.
All Packages Class Hierarchy This Package Previous Next Index