Mercurial > sdl-ios-xcode
diff src/libm/e_atan2.c @ 4874:8288636b861d
Compiling in atan()/atan2() implementation on Visual Studio 2008.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 29 Aug 2010 16:55:58 -0700 |
parents | d275c95ddc05 |
children |
line wrap: on
line diff
--- 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) */