public class RandomGenerator
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
init(long seed)
Initializes the RNG.
|
static boolean |
nextBoolean()
Return the next pseudorandom boolean value in the sequence.
|
static java.lang.Float |
nextFloat()
Return the next pseudorandom float value [0.0, 1.0) in the sequence.
|
static int |
nextInt(int bound)
Return the next pseudorandom integer value [0, bound) in the sequence.
|
public static void init(long seed)
seed
- the seed for the RNGpublic static java.lang.Float nextFloat()
public static int nextInt(int bound)
bound
- the upper boundpublic static boolean nextBoolean()