From c00c7863192283ce9b8639911200fc28943f9aef Mon Sep 17 00:00:00 2001 From: wileyanderssen Date: Thu, 7 Aug 2025 22:02:55 +0300 Subject: [PATCH] removed check for macro defined variable that exists in multiple functions the check happens at the beginning of the file --- src/raymath.h | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/raymath.h b/src/raymath.h index 9a0d42d0e..28c8b7219 100644 --- a/src/raymath.h +++ b/src/raymath.h @@ -219,10 +219,6 @@ RMAPI float Wrap(float value, float min, float max) // Check whether two given floats are almost equal RMAPI int FloatEquals(float x, float y) { -#if !defined(EPSILON) - #define EPSILON 0.000001f -#endif - int result = (fabsf(x - y)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(x), fabsf(y)))); return result; @@ -548,10 +544,6 @@ RMAPI Vector2 Vector2ClampValue(Vector2 v, float min, float max) // Check whether two given vectors are almost equal RMAPI int Vector2Equals(Vector2 p, Vector2 q) { -#if !defined(EPSILON) - #define EPSILON 0.000001f -#endif - int result = ((fabsf(p.x - q.x)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.x), fabsf(q.x))))) && ((fabsf(p.y - q.y)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.y), fabsf(q.y))))); @@ -1444,10 +1436,6 @@ RMAPI Vector4 Vector4Invert(Vector4 v) // Check whether two given vectors are almost equal RMAPI int Vector4Equals(Vector4 p, Vector4 q) { -#if !defined(EPSILON) - #define EPSILON 0.000001f -#endif - int result = ((fabsf(p.x - q.x)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.x), fabsf(q.x))))) && ((fabsf(p.y - q.y)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.y), fabsf(q.y))))) && ((fabsf(p.z - q.z)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.z), fabsf(q.z))))) && @@ -2196,10 +2184,6 @@ RMAPI Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount) { Quaternion result = { 0 }; -#if !defined(EPSILON) - #define EPSILON 0.000001f -#endif - float cosHalfTheta = q1.x*q2.x + q1.y*q2.y + q1.z*q2.z + q1.w*q2.w; if (cosHalfTheta < 0) @@ -2532,10 +2516,6 @@ RMAPI Quaternion QuaternionTransform(Quaternion q, Matrix mat) // Check whether two given quaternions are almost equal RMAPI int QuaternionEquals(Quaternion p, Quaternion q) { -#if !defined(EPSILON) - #define EPSILON 0.000001f -#endif - int result = (((fabsf(p.x - q.x)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.x), fabsf(q.x))))) && ((fabsf(p.y - q.y)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.y), fabsf(q.y))))) && ((fabsf(p.z - q.z)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.z), fabsf(q.z))))) &&