Skip to content

Commit dd52bb4

Browse files
committed
drop M_PI
1 parent 947e92c commit dd52bb4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/engine/qcommon/q_shared.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Maryland 20850 USA.
4040
// math.h/cmath uses _USE_MATH_DEFINES to decide if to define M_PI etc or not.
4141
// So define _USE_MATH_DEFINES early before including math.h/cmath
4242
// and before including any other header in case they bring in math.h/cmath indirectly.
43+
// NOTE: We don't use M_PI anymore (2024-11-25).
4344
#ifndef _USE_MATH_DEFINES
4445
#define _USE_MATH_DEFINES
4546
#endif
@@ -273,10 +274,6 @@ void Com_Free_Aligned( void *ptr );
273274
using fixed8_t = int;
274275
using fixed16_t = int;
275276

276-
#ifndef M_PI
277-
#define M_PI 3.14159265358979323846f // matches value in gcc v2 math.h
278-
#endif
279-
280277
#ifndef LINE_DISTANCE_EPSILON
281278
#define LINE_DISTANCE_EPSILON 1e-05f
282279
#endif

src/engine/sys/sdl_glimp.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2020
===========================================================================
2121
*/
2222

23-
#include "qcommon/q_shared.h" // Include before SDL.h due to M_PI issue...
23+
// Include before SDL.h due to M_PI issue...
24+
// NOTE: We don't use M_PI anymore (2024-11-25).
25+
#include "qcommon/q_shared.h"
2426
#include <SDL.h>
2527

2628
#ifdef USE_SMP

0 commit comments

Comments
 (0)