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);
106 template <
class T>
static bool linePlaneIntersection(
const DtVector3<T>& linePoint1,
const DtVector3<T>& linePoint2,
111 template <
class T>
static bool isFinite(T
n);
113 template <
class T>
static T Min(T lhs, T rhs);
114 template <
class T>
static T Max(T lhs, T rhs);
136 Assert(minval <= maxval &&
"Invalid clamp range");
173 T theta = toRadians(thetaDegrees);
174 T phi = toRadians(phiDegrees);
183 T temp = vPosition.
y;
184 vPosition.
y = vPosition.
z;
210 intersect = (lineDir *
w) + linePoint1;
229 return normalizedValue;
236 && (n != +std::numeric_limits<T>::infinity())
237 && (n != -std::numeric_limits<T>::infinity())