Skip to content

Commit c251e93

Browse files
authored
Fix implicit conversion from float to double then back to float again (#3799)
1 parent dc7f81a commit c251e93

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/raymath.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ typedef struct float16 {
165165
float v[16];
166166
} float16;
167167

168-
#include <math.h> // Required for: sinf(), cosf(), tan(), atan2f(), sqrtf(), floor(), fminf(), fmaxf(), fabs()
168+
#include <math.h> // Required for: sinf(), cosf(), tan(), atan2f(), sqrtf(), floor(), fminf(), fmaxf(), fabsf()
169169

170170
//----------------------------------------------------------------------------------
171171
// Module Functions Definition - Utils math
@@ -605,12 +605,12 @@ RMAPI Vector3 Vector3Perpendicular(Vector3 v)
605605
{
606606
Vector3 result = { 0 };
607607

608-
float min = (float) fabs(v.x);
608+
float min = fabsf(v.x);
609609
Vector3 cardinalAxis = {1.0f, 0.0f, 0.0f};
610610

611611
if (fabsf(v.y) < min)
612612
{
613-
min = (float) fabs(v.y);
613+
min = fabsf(v.y);
614614
Vector3 tmp = {0.0f, 1.0f, 0.0f};
615615
cardinalAxis = tmp;
616616
}

0 commit comments

Comments
 (0)