Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Compiling in atan()/atan2() implementation on Visual Studio 2008.

  • Loading branch information
slouken committed Aug 29, 2010
1 parent b8faf5d commit 969f333ffe8e0abafa371fae31b8a5237f87f87a
Showing with 12 additions and 2 deletions.
  1. +8 −0 VisualC/SDL/SDL_VS2008.vcproj
  2. +2 −0 include/SDL_config_win32.h
  3. +2 −2 src/libm/e_atan2.c
@@ -539,6 +539,10 @@
RelativePath="..\..\src\audio\windx5\directx.h"
>
</File>
<File
RelativePath="..\..\src\libm\e_atan2.c"
>
</File>
<File
RelativePath="..\..\src\libm\e_log.c"
>
@@ -579,6 +583,10 @@
RelativePath="..\..\src\video\mmx.h"
>
</File>
<File
RelativePath="..\..\src\libm\s_atan.c"
>
</File>
<File
RelativePath="..\..\src\libm\s_copysign.c"
>
@@ -125,6 +125,8 @@ typedef unsigned int uintptr_t;
#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
@@ -57,8 +57,8 @@ double attribute_hidden __ieee754_atan2(double y, double x)
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) */

0 comments on commit 969f333

Please sign in to comment.