|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jsyn.util.PseudoRandom
public class PseudoRandom
Pseudo-random numbers using predictable and fast linear-congruential method.
Constructor Summary | |
---|---|
PseudoRandom()
Create an instance of SynthRandom. |
|
PseudoRandom(long seed)
Create an instance of SynthRandom. |
Method Summary | |
---|---|
double |
convertIntToDouble(int n)
Scale an integer into the range -1.0 to +1.0; |
double |
nextRandomDouble()
Returns the next random double from -1.0 to 1.0 |
int |
nextRandomInteger()
Calculate random 32 bit number using linear-congruential method. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PseudoRandom()
public PseudoRandom(long seed)
Method Detail |
---|
public double convertIntToDouble(int n)
n
-
public double nextRandomDouble()
public int nextRandomInteger()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |