Skip to content

Commit bbe5114

Browse files
committed
Defining MY_SQRT2 in r_utility.cpp also to keep visual studio happy.
1 parent 957587a commit bbe5114

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rendering/r_utility.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
#include "i_interface.h"
6969
#include "d_main.h"
7070

71+
const float MY_SQRT2 = 1.41421356237309504880; // sqrt(2)
7172
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
7273

7374
extern bool DrawFSHUD; // [RH] Defined in d_main.cpp
@@ -696,7 +697,7 @@ void FRenderViewpoint::SetViewAngle(const FViewWindow& viewWindow)
696697
PitchSin = Angles.Pitch.Sin();
697698
PitchCos = Angles.Pitch.Cos();
698699

699-
floordistfact = M_SQRT2 + ( fabs(Cos) > fabs(Sin) ? 1.0/fabs(Cos) : 1.0/fabs(Sin) );
700+
floordistfact = MY_SQRT2 + ( fabs(Cos) > fabs(Sin) ? 1.0/fabs(Cos) : 1.0/fabs(Sin) );
700701
cotfloor = ( fabs(Cos) > fabs(Sin) ? fabs(Sin/Cos) : fabs(Cos/Sin) );
701702

702703
const DVector2 v = Angles.Yaw.ToVector();

0 commit comments

Comments
 (0)