public class TrueRandom
extends java.lang.Object
This Class is used to provide "true" randomized numbers for IL-2 Sturmovik 1946, in opposite to the reproduceable "pseudo" random numbers being available in the stock game.
Modifier and Type | Method and Description |
---|---|
static void |
makeIl2TrueRandom()
This method can turn the "pseudo" random behaviour of IL-2 into "real" random behaviour
with a single line of code.
|
static double |
nextDouble_Dome(double min,
double max)
Returns the next pseudorandom, "Dome" type distributed double value between the specified min and max values from this random number generator's sequence.
|
static double |
nextDouble_DomeInv(double min,
double max)
Returns the next pseudorandom, "Inverted Dome" type distributed double value between the specified min and max values from this random number generator's sequence.
|
static double |
nextDouble_Fade(double min,
double max)
Returns the next pseudorandom, "Fade" type distributed double value between the specified min and max values from this random number generator's sequence.
|
static double |
nextDouble()
Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.
|
static double |
nextDouble(double max)
Returns a pseudorandom, uniformly distributed double value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.
|
static double |
nextDouble(double min,
double max)
Returns a pseudorandom, uniformly distributed double value between min (inclusive) and max (exclusive), drawn from this random number generator's sequence.
|
static float |
nextFloat_Dome(float min,
float max)
Returns the next pseudorandom, "Dome" type distributed float value between the specified min and max values from this random number generator's sequence.
|
static float |
nextFloat_DomeInv(float min,
float max)
Returns the next pseudorandom, "Inverted Dome" type distributed float value between the specified min and max values from this random number generator's sequence.
|
static float |
nextFloat_Fade(float min,
float max)
Returns the next pseudorandom, "Fade" type distributed float value between the specified min and max values from this random number generator's sequence.
|
static float |
nextFloat()
Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.
|
static float |
nextFloat(float max)
Returns a pseudorandom, uniformly distributed float value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.
|
static float |
nextFloat(float min,
float max)
Returns a pseudorandom, uniformly distributed float value between min (inclusive) and max (exclusive), drawn from this random number generator's sequence.
|
static double |
nextGaussian()
Returns the next pseudorandom, Gaussian ("normally") distributed double value with mean 0.0 and standard deviation 1.0 from this random number generator's sequence.
|
static double |
nextGaussian(double deviation)
Returns the next pseudorandom, Gaussian ("normally") distributed double value with mean 0.0 and the specified deviation from this random number generator's sequence.
|
static double |
nextGaussian(double deviation,
double center)
Returns the next pseudorandom, Gaussian ("normally") distributed double value with the specified mean and deviation from this random number generator's sequence.
|
static float |
nextInt_Dome(int min,
int max)
Returns the next pseudorandom, "Dome" type distributed int value between the specified min and max values from this random number generator's sequence.
|
static float |
nextInt_DomeInv(int min,
int max)
Returns the next pseudorandom, "Inverted Dome" type distributed int value between the specified min and max values from this random number generator's sequence.
|
static float |
nextInt_Fade(int min,
int max)
Returns the next pseudorandom, "Fade" type distributed int value between the specified min and max values from this random number generator's sequence.
|
static int |
nextInt()
Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence.
|
static int |
nextInt(int max)
Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.
|
static int |
nextInt(int min,
int max)
Returns a pseudorandom, uniformly distributed int value between min (inclusive) and max (exclusive), drawn from this random number generator's sequence.
|
static float |
nextLong_Dome(long min,
long max)
Returns the next pseudorandom, "Dome" type distributed long value between the specified min and max values from this random number generator's sequence.
|
static float |
nextLong_DomeInv(long min,
long max)
Returns the next pseudorandom, "Inverted Dome" type distributed long value between the specified min and max values from this random number generator's sequence.
|
static float |
nextLong_Fade(long min,
long max)
Returns the next pseudorandom, "Fade" type distributed long value between the specified min and max values from this random number generator's sequence.
|
static long |
nextLong()
Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence.
|
static long |
nextLong(long max)
Returns a pseudorandom, uniformly distributed long value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.
|
static long |
nextLong(long min,
long max)
Returns a pseudorandom, uniformly distributed long value between min (inclusive) and max (exclusive), drawn from this random number generator's sequence.
|
public static final void makeIl2TrueRandom()
public static final int nextInt()
public static final int nextInt(int max)
max
- the bound on the random number to be returned. Must be positive.java.lang.IllegalArgumentException
- if max is not positive.public static final int nextInt(int min, int max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned. Must be larger than min.java.lang.IllegalArgumentException
- if max-min is not positive.public static final long nextLong()
public static final long nextLong(long max)
max
- the bound on the random number to be returned. Must be positive.java.lang.IllegalArgumentException
- if max is not positive.public static final long nextLong(long min, long max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned. Must be larger than min.java.lang.IllegalArgumentException
- if max-min is not positive.public static final float nextFloat()
public static final float nextFloat(float max)
max
- the bound on the random number to be returned. Can be positive or negative.public static final float nextFloat(float min, float max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.public static final double nextDouble()
public static final double nextDouble(double max)
max
- the bound on the random number to be returned. Can be positive or negative.public static final double nextDouble(double min, double max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.public static final double nextGaussian()
public static final double nextGaussian(double deviation)
deviation
- the deviation for this Gaussian Distributionpublic static final double nextGaussian(double deviation, double center)
deviation
- the deviation for this Gaussian Distributioncenter
- the mean for this Gaussian Distributionpublic static final double nextDouble_Dome(double min, double max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.public static final float nextFloat_Dome(float min, float max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.public static final float nextInt_Dome(int min, int max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.public static final float nextLong_Dome(long min, long max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.public static final double nextDouble_DomeInv(double min, double max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.public static final float nextFloat_DomeInv(float min, float max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.public static final float nextInt_DomeInv(int min, int max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.public static final float nextLong_DomeInv(long min, long max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.public static final double nextDouble_Fade(double min, double max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.public static final float nextFloat_Fade(float min, float max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.public static final float nextInt_Fade(int min, int max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.public static final float nextLong_Fade(long min, long max)
min
- the lower bound on the random number to be returned.max
- the upper bound on the random number to be returned.