public class Rand
extends java.lang.Object
Class to obtain random values
Constructor and Description |
---|
Rand()
Empty constructor
|
Modifier and Type | Method and Description |
---|---|
static double |
frandom(double min,
double max)
Method that returns a random double value between min and max values
|
static int |
irandom(double min,
double max)
Method that returns a random integer value between min and max values
|
static double |
Normal(double mean,
double sigma)
Generate a normal distributed value for N(m, s)
|
public static double frandom(double min, double max)
Method that returns a random double value between min and max values
min
- Minimum double valuemax
- Maximum double valuepublic static int irandom(double min, double max)
Method that returns a random integer value between min and max values
min
- Minimum double valuemax
- Maximum double valuepublic static double Normal(double mean, double sigma)
Generate a normal distributed value for N(m, s)
mean
- Mean of the normal distributionsigma
- Standard deviation of the normal distribution