public class PseudoRandom
extends java.lang.Object
Constructor and Description |
---|
PseudoRandom()
Create an instance of SynthRandom.
|
PseudoRandom(int seed)
Create an instance of PseudoRandom.
|
Modifier and Type | Method and Description |
---|---|
int |
choose(int range) |
int |
getSeed() |
double |
nextRandomDouble()
Returns the next random double from -1.0 to 1.0
|
int |
nextRandomInteger()
Calculate random 32 bit number using linear-congruential method.
|
double |
random()
Returns the next random double from 0.0 to 1.0
|
void |
setSeed(int seed) |
public PseudoRandom()
public PseudoRandom(int seed)
public void setSeed(int seed)
public int getSeed()
public double random()
public double nextRandomDouble()
public int nextRandomInteger()
public int choose(int range)