Class Mathd
- java.lang.Object
-
- WildMagic.LibFoundation.Mathematics.Mathd
-
- All Implemented Interfaces:
java.io.Serializable
public final class Mathd extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static double
DEG_TO_RAD
static double
EPSILON
static double
HALF_PI
static double
INV_LN_10
static double
INV_LN_2
static double
INV_PI
static double
LN_10
static double
LN_2
static double
RAD_TO_DEG
private static long
serialVersionUID
static double
SQRT2
static double
TWO_PI
static double
ZERO_TOLERANCE
-
Constructor Summary
Constructors Constructor Description Mathd()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
InvSqrt(double dValue)
Calculation of 1/sqrt(dValue)static double
Log2(float dValue)
static double
SymmetricRandom()
Generate a random number in [-1,1).static double
UnitRandom()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
ZERO_TOLERANCE
public static final double ZERO_TOLERANCE
- See Also:
- Constant Field Values
-
TWO_PI
public static final double TWO_PI
- See Also:
- Constant Field Values
-
HALF_PI
public static final double HALF_PI
- See Also:
- Constant Field Values
-
INV_PI
public static final double INV_PI
- See Also:
- Constant Field Values
-
DEG_TO_RAD
public static final double DEG_TO_RAD
- See Also:
- Constant Field Values
-
SQRT2
public static final double SQRT2
-
EPSILON
public static final double EPSILON
- See Also:
- Constant Field Values
-
RAD_TO_DEG
public static final double RAD_TO_DEG
- See Also:
- Constant Field Values
-
LN_2
public static final double LN_2
-
LN_10
public static final double LN_10
-
INV_LN_2
public static final double INV_LN_2
-
INV_LN_10
public static final double INV_LN_10
-
-
Method Detail
-
InvSqrt
public static double InvSqrt(double dValue)
Calculation of 1/sqrt(dValue)- Parameters:
dValue
- value to calculate 1/sqrt(dValue)- Returns:
- 1/sqrt(dValue)
-
Log2
public static double Log2(float dValue)
-
SymmetricRandom
public static double SymmetricRandom()
Generate a random number in [-1,1). The random number generator may be seeded by a first call to SymmetricRandom with a positive seed.- Returns:
- a random number in [-1,1)
-
UnitRandom
public static double UnitRandom()
-
-