public final class Mathf extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static float |
DEG_TO_RAD |
static float |
EPSILON |
static float |
HALF_PI |
static float |
INV_LN_10 |
static float |
INV_LN_2 |
static float |
INV_PI |
static float |
LN_10 |
static float |
LN_2 |
static float |
RAD_TO_DEG |
private static long |
serialVersionUID |
static float |
SQRT2 |
static float |
TWO_PI |
static float |
ZERO_TOLERANCE |
Constructor and Description |
---|
Mathf() |
Modifier and Type | Method and Description |
---|---|
static double |
InvSqrt(double fValue)
Calculation of 1/sqrt(fValue)
|
static float |
InvSqrt(float fValue)
Calculation of 1/sqrt(fValue)
|
static float |
Log2(float fValue) |
static float |
SymmetricRandom()
Generate a random number in [-1,1).
|
static float |
UnitRandom() |
private static final long serialVersionUID
public static final float ZERO_TOLERANCE
public static final float TWO_PI
public static final float HALF_PI
public static final float INV_PI
public static final float DEG_TO_RAD
public static final float SQRT2
public static final float EPSILON
public static final float RAD_TO_DEG
public static final float LN_2
public static final float LN_10
public static final float INV_LN_2
public static final float INV_LN_10
public static float InvSqrt(float fValue)
fValue
- value to calculate 1/sqrt(fValue)public static double InvSqrt(double fValue)
fValue
- value to calculate 1/sqrt(fValue)public static float Log2(float fValue)
public static float SymmetricRandom()
public static float UnitRandom()