Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Compiling in atan()/atan2() implementation on Visual Studio 2008.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Aug 29, 2010
1 parent b8faf5d commit 969f333
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions VisualC/SDL/SDL_VS2008.vcproj
Expand Up @@ -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"
>
Expand Down Expand Up @@ -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"
>
Expand Down
2 changes: 2 additions & 0 deletions include/SDL_config_win32.h
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/libm/e_atan2.c
Expand Up @@ -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) */
Expand Down

0 comments on commit 969f333

Please sign in to comment.