Method | Description | |
---|---|---|
absMod ( int a, int b ) : int |
循环取模运算 (区别于%运算,例:absMode(-1,3) = 2)
|
|
absMode ( float a, float b ) : float |
循环取模运算 (区别于%运算,例:absMode(-1,3) = 2)
|
|
clamp ( double value, double min, double max ) : double | ||
clamp ( float value, float min, float max ) : float | ||
clamp ( int value, int min, int max ) : int | ||
copyVec3 ( Vector3 &vec ) : void | ||
cutRadian ( float value ) : float | ||
floatEquals ( float a, float b ) : bool | ||
getIntBitNum ( int n ) : int | ||
getPowerOf2 ( int n ) : int | ||
isPowerOf2 ( int n ) : bool | ||
log2 ( int i ) : int | ||
numberOfLeadingZeros ( uint i ) : uint | ||
random ( ) : double |
产生一个(0-1)的double
|
|
randomBoolean ( ) : bool |
ran一bool值
|
|
randomDirection ( ) : float | ||
randomFloat ( ) : float | ||
randomInt ( ) : int | ||
randomInt ( int len ) : int |
产生一个整形(0<=value |
|
randomLong ( ) : long | ||
randomOffSet ( int value, int offset ) : int | ||
randomOffSetF ( float value, float offset ) : float | ||
randomOffSetPercent ( int value, int offset ) : int | ||
randomProb ( int prob ) : bool | ||
randomProb ( int prob, int max ) : bool | ||
randomRange ( int start, int end ) : int | ||
randomRange2 ( int start, int end ) : int |
public static absMode ( float a, float b ) : float | ||
a | float | |
b | float | |
return | float |
public static clamp ( double value, double min, double max ) : double | ||
value | double | |
min | double | |
max | double | |
return | double |
public static clamp ( float value, float min, float max ) : float | ||
value | float | |
min | float | |
max | float | |
return | float |
public static clamp ( int value, int min, int max ) : int | ||
value | int | |
min | int | |
max | int | |
return | int |
public static copyVec3 ( Vector3 &vec ) : void | ||
vec | Vector3 | |
return | void |
public static cutRadian ( float value ) : float | ||
value | float | |
return | float |
public static floatEquals ( float a, float b ) : bool | ||
a | float | |
b | float | |
return | bool |
public static numberOfLeadingZeros ( uint i ) : uint | ||
i | uint | |
return | uint |
public static randomOffSet ( int value, int offset ) : int | ||
value | int | |
offset | int | |
return | int |
public static randomOffSetF ( float value, float offset ) : float | ||
value | float | |
offset | float | |
return | float |
public static randomOffSetPercent ( int value, int offset ) : int | ||
value | int | |
offset | int | |
return | int |
public static randomProb ( int prob, int max ) : bool | ||
prob | int | |
max | int | |
return | bool |
public static randomRange ( int start, int end ) : int | ||
start | int | |
end | int | |
return | int |
public static randomRange2 ( int start, int end ) : int | ||
start | int | |
end | int | |
return | int |