4 #define _USE_MATH_DEFINES 16 static T
Lerp(T Start, T End,
float Rate);
21 if (fabsf(Deg) < FLT_EPSILON) {
return 0.0f; }
22 return (
float)(Deg * M_PI / 180.0f);
28 if (fabsf(Rad) < FLT_EPSILON) {
return 0.0f; }
29 return (
float)(Rad * 180.0f / M_PI);
37 Result.
X = ((Vec.
X * cosf(Rad)) - (Vec.
Y * sinf(Rad)));
38 Result.
Y = ((Vec.
X * sinf(Rad)) + (Vec.
Y * cosf(Rad)));
46 return ((A.
X * B.
X) + (A.
Y * B.
Y) + (A.
Z * B.
Z));
53 Vec.
X = (A.
Y * B.
Z) - (A.
Z * B.
Y);
54 Vec.
Y = (A.
Z * B.
X) - (A.
X * B.
Z);
55 Vec.
Z = (A.
X * B.
Y) - (A.
Y * B.
X);
61 #endif // #ifndef __MATHUTIL_H__ static float DegToRad(float Deg)
Definition: MathUtil.h:19
static float RadToDeg(float Rad)
Definition: MathUtil.h:26
float Z
Definition: Vector3D.h:32
static float Dot(const Vector3D &A, const Vector3D &B)
Definition: MathUtil.h:44
float X
Definition: Vector3D.h:30
float Y
Definition: Vector3D.h:31
static T Lerp(T Start, T End, float Rate)
static Vector3D RotateVector(const Vector3D &Vec, float Deg)
Definition: MathUtil.h:33
static Vector3D Cross(const Vector3D &A, const Vector3D &B)
Definition: MathUtil.h:50