54 template <
class T>
static T
Sqrt(T
val) {
return sqrt(val);}
55 template <
class T>
static T
Abs(T
val) {
return fabs(val);}
57 template <
class T>
static T
Sin(T
val) {
return sin(val);}
58 template <
class T>
static T
Cos(T
val) {
return cos(val);}
59 template <
class T>
static T
Tan(T
val) {
return tan(val);}
67 template <
class T>
static int NumDigits(T
val);
68 template <
class T>
static double GetNormalizedValueRespectingLength(T
val);
72 static bool isEqual(
int32 lhs,
int32 rhs,
int32 tolerance=std::numeric_limits<int32>::epsilon());
73 static bool isEqual(
uint32 lhs,
uint32 rhs,
uint32 tolerance=std::numeric_limits<uint32>::epsilon());
74 static bool isEqual(
float32 lhs,
float32 rhs,
float32 tolerance=std::numeric_limits<float32>::epsilon());
75 static bool isEqual(
float64 lhs,
float64 rhs,
float64 tolerance=std::numeric_limits<float64>::epsilon());
81 static float32 unitRandom32(
void);
82 static float64 unitRandom64(
void);
84 static int rangeRandom(
int iLow,
int iHigh);
87 static bool randomBool(
void);
95 template <
class T>
static T
clamp(T
val, T minval, T maxval);
102 template <
class T>
static DtVector3<T> toCartesian(T thetaDegrees, T phiDegrees,
bool flipYZ);
104 template <
class T>
static bool isFinite(T
n);
108 template <
class T>
static T
positiveInfinity(
void) {
return std::numeric_limits<T>::max();}
109 template <
class T>
static T
negativeInfinity(
void) {
return std::numeric_limits<T>::min();}
126 Assert(minval <= maxval &&
"Invalid clamp range");
127 return std::max(std::min(val, maxval), minval);
163 T theta = toRadians(thetaDegrees);
164 T phi = toRadians(phiDegrees);
173 T temp = vPosition.
y;
174 vPosition.
y = vPosition.
z;
195 double normalizedValue = (double)(val)/(double)(std::numeric_limits<T>::max());
196 return normalizedValue;
203 && (n != +std::numeric_limits<T>::infinity())
204 && (n != -std::numeric_limits<T>::infinity())