diff --git a/src/camera.h b/src/camera.h index 8067e7bfc..6bada6669 100644 --- a/src/camera.h +++ b/src/camera.h @@ -244,8 +244,8 @@ void SetCameraMode(Camera camera, int mode) distance.y = sqrtf(dx*dx + dy*dy); // Camera angle calculation - cameraAngle.x = asinf(fabsf(dx)/distance.x); // Camera angle in plane XZ (0 aligned with Z, move positive CCW) - cameraAngle.y = -asinf(fabsf(dy)/distance.y); // Camera angle in plane XY (0 aligned with X, move positive CW) + cameraAngle.x = asinf(fabs(dx)/distance.x); // Camera angle in plane XZ (0 aligned with Z, move positive CCW) + cameraAngle.y = -asinf(fabs(dy)/distance.y); // Camera angle in plane XY (0 aligned with X, move positive CW) // NOTE: Just testing what cameraAngle means //cameraAngle.x = 0.0f*DEG2RAD; // Camera angle in plane XZ (0 aligned with Z, move positive CCW) diff --git a/src/external/jar_xm.h b/src/external/jar_xm.h index 9d4f5b5b5..c8c9e3c92 100644 --- a/src/external/jar_xm.h +++ b/src/external/jar_xm.h @@ -2365,7 +2365,7 @@ static void jar_xm_tick(jar_xm_context_t* ctx) { float panning, volume; panning = ch->panning + - (ch->panning_envelope_panning - .5f) * (.5f - fabsf(ch->panning - .5f)) * 2.0f; + (ch->panning_envelope_panning - .5f) * (.5f - fabs(ch->panning - .5f)) * 2.0f; if(ch->tremor_on) { volume = .0f; diff --git a/src/models.c b/src/models.c index afeee0fc2..b389333b6 100644 --- a/src/models.c +++ b/src/models.c @@ -1837,9 +1837,9 @@ void DrawBoundingBox(BoundingBox box, Color color) { Vector3 size; - size.x = fabsf(box.max.x - box.min.x); - size.y = fabsf(box.max.y - box.min.y); - size.z = fabsf(box.max.z - box.min.z); + size.x = fabs(box.max.x - box.min.x); + size.y = fabs(box.max.y - box.min.y); + size.z = fabs(box.max.z - box.min.z); Vector3 center = { box.min.x + size.x/2.0f, box.min.y + size.y/2.0f, box.min.z + size.z/2.0f }; @@ -2074,7 +2074,7 @@ RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight) RayHitInfo result = { 0 }; - if (fabsf(ray.direction.y) > EPSILON) + if (fabs(ray.direction.y) > EPSILON) { float distance = (ray.position.y - groundHeight)/-ray.direction.y; diff --git a/src/raymath.h b/src/raymath.h index b0046522f..51a9e6dbd 100644 --- a/src/raymath.h +++ b/src/raymath.h @@ -296,17 +296,17 @@ RMDEF Vector3 Vector3Perpendicular(Vector3 v) { Vector3 result = { 0 }; - float min = fabsf(v.x); + float min = fabs(v.x); Vector3 cardinalAxis = {1.0f, 0.0f, 0.0f}; - if (fabsf(v.y) < min) + if (fabs(v.y) < min) { - min = fabsf(v.y); + min = fabs(v.y); Vector3 tmp = {0.0f, 1.0f, 0.0f}; cardinalAxis = tmp; } - if (fabsf(v.z) < min) + if (fabs(v.z) < min) { Vector3 tmp = {0.0f, 0.0f, 1.0f}; cardinalAxis = tmp; diff --git a/src/rlgl.c b/src/rlgl.c index 8912a3940..87613b362 100644 --- a/src/rlgl.c +++ b/src/rlgl.c @@ -3948,7 +3948,7 @@ static void SetStereoConfig(VrDeviceInfo hmd) // Compute distortion scale parameters // NOTE: To get lens max radius, lensShift must be normalized to [-1..1] - float lensRadius = fabsf(-1.0f - 4.0f*lensShift); + float lensRadius = fabs(-1.0f - 4.0f*lensShift); float lensRadiusSq = lensRadius*lensRadius; float distortionScale = hmd.lensDistortionValues[0] + hmd.lensDistortionValues[1]*lensRadiusSq + diff --git a/src/shapes.c b/src/shapes.c index dc547e0d2..604dcb87e 100644 --- a/src/shapes.c +++ b/src/shapes.c @@ -648,8 +648,8 @@ bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2) { bool collision = false; - float dx = fabsf((rec1.x + rec1.width/2) - (rec2.x + rec2.width/2)); - float dy = fabsf((rec1.y + rec1.height/2) - (rec2.y + rec2.height/2)); + float dx = fabs((rec1.x + rec1.width/2) - (rec2.x + rec2.width/2)); + float dy = fabs((rec1.y + rec1.height/2) - (rec2.y + rec2.height/2)); if ((dx <= (rec1.width/2 + rec2.width/2)) && ((dy <= (rec1.height/2 + rec2.height/2)))) collision = true; @@ -678,8 +678,8 @@ bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec) int recCenterX = rec.x + rec.width/2; int recCenterY = rec.y + rec.height/2; - float dx = fabsf(center.x - recCenterX); - float dy = fabsf(center.y - recCenterY); + float dx = fabs(center.x - recCenterX); + float dy = fabs(center.y - recCenterY); if (dx > (rec.width/2.0f + radius)) { return false; } if (dy > (rec.height/2.0f + radius)) { return false; } @@ -700,8 +700,8 @@ Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2) if (CheckCollisionRecs(rec1, rec2)) { - float dxx = fabsf(rec1.x - rec2.x); - float dyy = fabsf(rec1.y - rec2.y); + float dxx = fabs(rec1.x - rec2.x); + float dyy = fabs(rec1.y - rec2.y); if (rec1.x <= rec2.x) {