summaryrefslogtreecommitdiffstats
path: root/src/math
diff options
context:
space:
mode:
Diffstat (limited to 'src/math')
-rw-r--r--src/math/Vector.h2
-rw-r--r--src/math/Vector2D.h2
-rw-r--r--src/math/math.cpp2
-rw-r--r--src/math/maths.h8
4 files changed, 9 insertions, 5 deletions
diff --git a/src/math/Vector.h b/src/math/Vector.h
index 9a1dde7a..de8092eb 100644
--- a/src/math/Vector.h
+++ b/src/math/Vector.h
@@ -30,7 +30,7 @@ public:
void Normalise(void) {
float sq = MagnitudeSqr();
if(sq > 0.0f){
- float invsqrt = 1.0f/sqrt(sq); // CMaths::RecipSqrt
+ float invsqrt = 1.0f/Sqrt(sq); // CMaths::RecipSqrt
x *= invsqrt;
y *= invsqrt;
z *= invsqrt;
diff --git a/src/math/Vector2D.h b/src/math/Vector2D.h
index d0580545..e6b04c14 100644
--- a/src/math/Vector2D.h
+++ b/src/math/Vector2D.h
@@ -13,7 +13,7 @@ public:
void Normalise(void){
float sq = MagnitudeSqr();
if(sq > 0.0f){
- float invsqrt = 1.0f/sqrt(sq);
+ float invsqrt = 1.0f/Sqrt(sq);
x *= invsqrt;
y *= invsqrt;
}else
diff --git a/src/math/math.cpp b/src/math/math.cpp
index b4ba9c98..c1199fcc 100644
--- a/src/math/math.cpp
+++ b/src/math/math.cpp
@@ -14,7 +14,7 @@ CQuaternion::Slerp(const CQuaternion &q1, const CQuaternion &q2, float theta, fl
if(theta > PI/2){
theta = PI - theta;
w1 = Sin((1.0f - t) * theta) * invSin;
- w2 = -sin(t * theta) * invSin;
+ w2 = -Sin(t * theta) * invSin;
}else{
w1 = Sin((1.0f - t) * theta) * invSin;
w2 = Sin(t * theta) * invSin;
diff --git a/src/math/maths.h b/src/math/maths.h
index 49e39631..a1c3f109 100644
--- a/src/math/maths.h
+++ b/src/math/maths.h
@@ -4,9 +4,13 @@
// in gta they are in CMaths but that makes the code rather noisy
inline float Sin(float x) { return sinf(x); }
+inline float Asin(float x) { return asinf(x); }
inline float Cos(float x) { return cosf(x); }
+inline float Acos(float x) { return acosf(x); }
+inline float Tan(float x) { return tanf(x); }
+inline float Atan(float x) { return atanf(x); }
+inline float Atan2(float y, float x) { return atan2f(y, x); }
inline float Abs(float x) { return fabs(x); }
inline float Sqrt(float x) { return sqrtf(x); }
-inline float Atan2(float y, float x) { return atan2f(y, x); }
-inline float RecipSqrt(float x) { return 1.0f/sqrtf(x); }
+inline float RecipSqrt(float x) { return 1.0f/Sqrt(x); }
inline float Pow(float x, float y) { return powf(x, y); }