Skip to content

Commit 233cf39

Browse files
committed
Removed bool type from raymath, it broke raylib
1 parent ff95f05 commit 233cf39

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/raymath.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ typedef struct float16 {
159159
} float16;
160160

161161
#include <math.h> // Required for: sinf(), cosf(), tan(), atan2f(), sqrtf(), fminf(), fmaxf(), fabs()
162-
#include <stdbool.h> // Required for: bool, false, true
163162

164163
//----------------------------------------------------------------------------------
165164
// Module Functions Definition - Utils math
@@ -200,9 +199,9 @@ RMAPI float Remap(float value, float inputStart, float inputEnd, float outputSta
200199
}
201200

202201
// Check whether two given floats are almost equal
203-
RMAPI bool FloatEquals(float x, float y)
202+
RMAPI int FloatEquals(float x, float y)
204203
{
205-
bool result = (fabsf(x - y)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(x), fabsf(y))));
204+
int result = (fabsf(x - y)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(x), fabsf(y))));
206205

207206
return result;
208207
}
@@ -475,9 +474,9 @@ RMAPI Vector2 Vector2ClampValue(Vector2 v, float min, float max)
475474
}
476475

477476
// Check whether two given vectors are almost equal
478-
RMAPI bool Vector2Equals(Vector2 p, Vector2 q)
477+
RMAPI int Vector2Equals(Vector2 p, Vector2 q)
479478
{
480-
bool result = ((fabsf(p.x - q.x)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.x), fabsf(q.x))))) &&
479+
int result = ((fabsf(p.x - q.x)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.x), fabsf(q.x))))) &&
481480
((fabsf(p.y - q.y)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.y), fabsf(q.y)))));
482481

483482
return result;
@@ -971,9 +970,9 @@ RMAPI Vector3 Vector3ClampValue(Vector3 v, float min, float max)
971970
}
972971

973972
// Check whether two given vectors are almost equal
974-
RMAPI bool Vector3Equals(Vector3 p, Vector3 q)
973+
RMAPI int Vector3Equals(Vector3 p, Vector3 q)
975974
{
976-
bool result = ((fabsf(p.x - q.x)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.x), fabsf(q.x))))) &&
975+
int result = ((fabsf(p.x - q.x)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.x), fabsf(q.x))))) &&
977976
((fabsf(p.y - q.y)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.y), fabsf(q.y))))) &&
978977
((fabsf(p.z - q.z)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.z), fabsf(q.z)))));
979978

@@ -2000,9 +1999,9 @@ RMAPI Quaternion QuaternionTransform(Quaternion q, Matrix mat)
20001999
}
20012000

20022001
// Check whether two given quaternions are almost equal
2003-
RMAPI bool QuaternionEquals(Quaternion p, Quaternion q)
2002+
RMAPI int QuaternionEquals(Quaternion p, Quaternion q)
20042003
{
2005-
bool result = ((fabsf(p.x - q.x)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.x), fabsf(q.x))))) &&
2004+
int result = ((fabsf(p.x - q.x)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.x), fabsf(q.x))))) &&
20062005
((fabsf(p.y - q.y)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.y), fabsf(q.y))))) &&
20072006
((fabsf(p.z - q.z)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.z), fabsf(q.z))))) &&
20082007
((fabsf(p.w - q.w)) <= (EPSILON*fmaxf(1.0f, fmaxf(fabsf(p.w), fabsf(q.w)))));

0 commit comments

Comments
 (0)