Property | Type | Description | |
---|---|---|---|
DEG2_RAD | float | ||
HALF_PI | float | ||
INV_PI | float | ||
PI | float | ||
QUATER_PI | float | ||
RAD2_DEG | float | ||
THREE_HALVES_PI | float | ||
TWO_PI | float |
Method | Description | |
---|---|---|
Abs ( float x ) : float | ||
Abs ( int x ) : int | ||
Atan2 ( float y, float x ) : float | ||
Ceil ( float x ) : int | ||
CeilPowerOf2 ( int x ) : int |
Rounds up the value to the nearest higher power^2 value.
|
|
Clamp ( |
||
Clamp ( float a, float low, float high ) : float |
Returns the closest value to 'a' that is in between 'low' and 'high'
|
|
ClampToOut ( |
||
Cos ( float x ) : float | ||
Distance ( |
||
DistanceSquared ( |
||
FastAtan2 ( float y, float x ) : float | ||
FastPow ( float a, float b ) : float | ||
Floor ( float x ) : int | ||
IsPowerOfTwo ( int x ) : bool | ||
Map ( float val, float fromMin, float fromMax, float toMin, float toMax ) : float | ||
Max ( float a, float b ) : float | ||
Max ( int a, int b ) : int | ||
Min ( float a, float b ) : float | ||
Min ( int a, int b ) : int | ||
NextPowerOfTwo ( int x ) : int |
Next Largest Power of 2: Given a binary integer value x, the next largest power of 2 can be computed by a SWAR algorithm that recursively "folds" the upper bits into the lower bits. This process yields a bit vector with the same most significant 1 as x, but all 1's below it. Adding 1 to that value yields the next largest power of 2.
|
|
Pow ( float a, float b ) : float |
Computes a fast approximation to
|
|
RandomFloat ( |
||
RandomFloat ( float argLow, float argHigh ) : float | ||
ReduceAngle ( float theta ) : float | ||
Round ( float x ) : int | ||
Sin ( float x ) : float | ||
SinLut ( float x ) : float | ||
Sqrt ( float x ) : float |
Method | Description | |
---|---|---|
FloatToIntBits ( float number ) : int | ||
MathUtils ( ) : System |
public static Atan2 ( float y, float x ) : float | ||
y | float | |
x | float | |
return | float |
public static Clamp ( |
||
a | ||
low | ||
high | ||
return |
public static Clamp ( float a, float low, float high ) : float | ||
a | float | |
low | float | |
high | float | |
return | float |
public static ClampToOut ( |
||
a | ||
low | ||
high | ||
dest | ||
return | void |
public static Distance ( |
||
v1 | ||
v2 | ||
return | float |
public static DistanceSquared ( |
||
v1 | ||
v2 | ||
return | float |
public static FastAtan2 ( float y, float x ) : float | ||
y | float | |
x | float | |
return | float |
public static FastPow ( float a, float b ) : float | ||
a | float | |
b | float | |
return | float |
public static Map ( float val, float fromMin, float fromMax, float toMin, float toMax ) : float | ||
val | float | |
fromMin | float | |
fromMax | float | |
toMin | float | |
toMax | float | |
return | float |
public static Max ( float a, float b ) : float | ||
a | float | |
b | float | |
return | float |
public static Min ( float a, float b ) : float | ||
a | float | |
b | float | |
return | float |
public static Pow ( float a, float b ) : float | ||
a | float | a positive number |
b | float | a number |
return | float |
public static RandomFloat ( |
||
r | ||
argLow | float | |
argHigh | float | |
return | float |
public static RandomFloat ( float argLow, float argHigh ) : float | ||
argLow | float | |
argHigh | float | |
return | float |
public static ReduceAngle ( float theta ) : float | ||
theta | float | |
return | float |