public class RandomFloat
extends java.lang.Object
Constructor and Description |
---|
RandomFloat()
Constructs a random float generator with default seed.
|
RandomFloat(int seed)
Constructs a random float generator.
|
Modifier and Type | Method and Description |
---|---|
float |
normal()
Gets a pseudo-random float from a normal (Gaussian) distribution.
|
void |
setSeed(int seed)
Seeds the random number generator.
|
float |
uniform()
Gets a pseudo-random float from a uniform [0,1) distribution.
|
public RandomFloat()
public RandomFloat(int seed)
seed
- the seed with which to initialize the generator.public final float uniform()
public float normal()
public void setSeed(int seed)
seed
- the seed.