From 340034adf79c530452e46da502dc89a3ffdaab70 Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 21 Mar 2024 12:52:40 +0100 Subject: [PATCH] this can be just M_PI --- src/hardware/hw_clip.c | 2 +- src/hardware/r_opengl/r_opengl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_clip.c b/src/hardware/hw_clip.c index 926f68fc6..623527549 100644 --- a/src/hardware/hw_clip.c +++ b/src/hardware/hw_clip.c @@ -333,7 +333,7 @@ angle_t gld_FrustumAngle(angle_t tiltangle) // ok, this is a gross hack that barely works... // but at least it doesn't overestimate too much... - clipfov = atan(1 / projMatrix[0]) * 360 / M_PIl; + clipfov = atan(1 / projMatrix[0]) * 360 / M_PI; floatangle = 2.0f + (45.0f + (tilt / 1.9f)) * clipfov / 90.0f; if (floatangle >= 180.0) return 0xffffffff; diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 96c440ce6..f5b97bfcd 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -2952,7 +2952,7 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform) if (special_splitscreen) { - used_fov = atan(tan(used_fov*M_PIl/360)*0.8)*360/M_PIl; + used_fov = (float)(atan(tan(used_fov*M_PI/360)*0.8)*360/M_PI); GLPerspective((GLfloat)used_fov, 2*ASPECT_RATIO); } else