From bbe5114939761e5999ea4141773f1d5f32f76c8a Mon Sep 17 00:00:00 2001 From: "Dileep V. Reddy" Date: Sun, 7 Jul 2024 11:43:53 -0600 Subject: [PATCH] Defining MY_SQRT2 in r_utility.cpp also to keep visual studio happy. --- src/rendering/r_utility.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rendering/r_utility.cpp b/src/rendering/r_utility.cpp index f4dd214d3b..f740105ae8 100644 --- a/src/rendering/r_utility.cpp +++ b/src/rendering/r_utility.cpp @@ -68,6 +68,7 @@ #include "i_interface.h" #include "d_main.h" +const float MY_SQRT2 = 1.41421356237309504880; // sqrt(2) // EXTERNAL DATA DECLARATIONS ---------------------------------------------- extern bool DrawFSHUD; // [RH] Defined in d_main.cpp @@ -696,7 +697,7 @@ void FRenderViewpoint::SetViewAngle(const FViewWindow& viewWindow) PitchSin = Angles.Pitch.Sin(); PitchCos = Angles.Pitch.Cos(); - floordistfact = M_SQRT2 + ( fabs(Cos) > fabs(Sin) ? 1.0/fabs(Cos) : 1.0/fabs(Sin) ); + floordistfact = MY_SQRT2 + ( fabs(Cos) > fabs(Sin) ? 1.0/fabs(Cos) : 1.0/fabs(Sin) ); cotfloor = ( fabs(Cos) > fabs(Sin) ? fabs(Sin/Cos) : fabs(Cos/Sin) ); const DVector2 v = Angles.Yaw.ToVector();