Commit 515a3e58 authored by Sam Lantinga's avatar Sam Lantinga

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

parent d8303d3f
......@@ -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) */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment