From 2fc9631effee75d7158eb9cae68f54a0882c0d66 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Sat, 14 Aug 2010 20:10:20 +0000 Subject: [PATCH] mathlib.h, mathlib.c: changed nanmask from being a global to being a macro. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@275 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/mathlib.c | 1 - Quake/mathlib.h | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Quake/mathlib.c b/Quake/mathlib.c index 5590bebc..c94ef8c5 100644 --- a/Quake/mathlib.c +++ b/Quake/mathlib.c @@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" vec3_t vec3_origin = {0,0,0}; -int nanmask = 255<<23; /*-----------------------------------------------------------------*/ diff --git a/Quake/mathlib.h b/Quake/mathlib.h index 276ab1d7..a6b8b8b3 100644 --- a/Quake/mathlib.h +++ b/Quake/mathlib.h @@ -42,9 +42,9 @@ typedef int fixed16_t; struct mplane_s; extern vec3_t vec3_origin; -extern int nanmask; -#define IS_NAN(x) (((*(int *)&x)&nanmask)==nanmask) +#define nanmask (255<<23) /* 7F800000 */ +#define IS_NAN(x) (((*(int *) &x) & nanmask) == nanmask) #define CLAMP(_minval, x, _maxval) ((x) < (_minval) ? (_minval) : (x) > (_maxval) ? (_maxval) : (x))