# HG changeset patch # User Sam Lantinga # Date 1283126158 25200 # Node ID 8288636b861d63f4b2ac6e2cce0e0048bfbc10d2 # Parent 67ad1c88dda075d3a05ecbabd43a4c7bcedbf577 Compiling in atan()/atan2() implementation on Visual Studio 2008. diff -r 67ad1c88dda0 -r 8288636b861d VisualC/SDL/SDL_VS2008.vcproj --- a/VisualC/SDL/SDL_VS2008.vcproj Sun Aug 29 16:51:48 2010 -0700 +++ b/VisualC/SDL/SDL_VS2008.vcproj Sun Aug 29 16:55:58 2010 -0700 @@ -540,6 +540,10 @@ > + + @@ -580,6 +584,10 @@ > + + diff -r 67ad1c88dda0 -r 8288636b861d include/SDL_config_win32.h --- a/include/SDL_config_win32.h Sun Aug 29 16:51:48 2010 -0700 +++ b/include/SDL_config_win32.h Sun Aug 29 16:55:58 2010 -0700 @@ -125,6 +125,8 @@ #define HAVE__STRNICMP 1 #define HAVE_SSCANF 1 #define HAVE_M_PI 1 +#define HAVE_ATAN 1 +#define HAVE_ATAN2 1 #define HAVE_CEIL 1 #define HAVE_COPYSIGN 1 #define HAVE_COS 1 diff -r 67ad1c88dda0 -r 8288636b861d src/libm/e_atan2.c --- a/src/libm/e_atan2.c Sun Aug 29 16:51:48 2010 -0700 +++ b/src/libm/e_atan2.c Sun Aug 29 16:55:58 2010 -0700 @@ -57,8 +57,8 @@ ix = hx&0x7fffffff; EXTRACT_WORDS(hy,ly,y); iy = hy&0x7fffffff; - if(((ix|((lx|-lx)>>31))>0x7ff00000)|| - ((iy|((ly|-ly)>>31))>0x7ff00000)) /* x or y is NaN */ + if(((ix|((lx|-(int32_t)lx)>>31))>0x7ff00000)|| + ((iy|((ly|-(int32_t)ly)>>31))>0x7ff00000)) /* x or y is NaN */ return x+y; if(((hx-0x3ff00000)|lx)==0) return atan(y); /* x=1.0 */ m = ((hy>>31)&1)|((hx>>30)&2); /* 2*sign(x)+sign(y) */