summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJoão Foscarini <[email protected]>2024-02-17 10:41:03 +0100
committerGitHub <[email protected]>2024-02-17 10:41:03 +0100
commitc251e9309e066b9d2aa5ecbd15bcee45b9bef528 (patch)
tree1a4350d420c6e04e9f96134544416fc3f7f91267 /src
parentdc7f81a7b0cbc666812c870841313e0c15a87a0c (diff)
downloadraylib-c251e9309e066b9d2aa5ecbd15bcee45b9bef528.tar.gz
raylib-c251e9309e066b9d2aa5ecbd15bcee45b9bef528.zip
Fix implicit conversion from float to double then back to float again (#3799)
Diffstat (limited to 'src')
-rw-r--r--src/raymath.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/raymath.h b/src/raymath.h
index b46243f4..15e403cb 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -165,7 +165,7 @@ typedef struct float16 {
float v[16];
} float16;
-#include <math.h> // Required for: sinf(), cosf(), tan(), atan2f(), sqrtf(), floor(), fminf(), fmaxf(), fabs()
+#include <math.h> // Required for: sinf(), cosf(), tan(), atan2f(), sqrtf(), floor(), fminf(), fmaxf(), fabsf()
//----------------------------------------------------------------------------------
// Module Functions Definition - Utils math
@@ -605,12 +605,12 @@ RMAPI Vector3 Vector3Perpendicular(Vector3 v)
{
Vector3 result = { 0 };
- float min = (float) fabs(v.x);
+ float min = fabsf(v.x);
Vector3 cardinalAxis = {1.0f, 0.0f, 0.0f};
if (fabsf(v.y) < min)
{
- min = (float) fabs(v.y);
+ min = fabsf(v.y);
Vector3 tmp = {0.0f, 1.0f, 0.0f};
cardinalAxis = tmp;
}