[Plib-cvs] CVS: plib/src/js js.h,1.13,1.14
Brought to you by:
sjbaker
From: Wolfram K. <wol...@us...> - 2002-03-09 16:33:54
|
Update of /cvsroot/plib/plib/src/js In directory usw-pr-cvs1:/tmp/cvs-serv21200 Modified Files: js.h Log Message: Fixing compiler warnings Index: js.h =================================================================== RCS file: /cvsroot/plib/plib/src/js/js.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- js.h 24 Jan 2002 15:14:09 -0000 1.13 +++ js.h 9 Mar 2002 16:33:50 -0000 1.14 @@ -614,16 +614,16 @@ // wk: I know of no define for PI that we could use here: // SG_PI would pull in sg, M_PI is undefined for MSVC // But the accuracy of the value of PI is very unimportant at this point. - float s = sin((js.dwPOV & 0xFFFF) * (0.01 * 3.1415926535f / 180)); - float c = cos((js.dwPOV & 0xFFFF) * (0.01 * 3.1415926535f / 180)); + float s = (float)sin((js.dwPOV & 0xFFFF) * (0.01 * 3.1415926535f / 180)); + float c = (float)cos((js.dwPOV & 0xFFFF) * (0.01 * 3.1415926535f / 180)); // Convert to coordinates on a square so that North-East // is (1,1) not (.7,.7), etc. // s and c cannot both be zero so we won't divide by zero. if (fabs(s) < fabs(c)) { axes[6] = (c < 0.0) ? -s/c : s/c; - axes[7] = (c < 0.0) ? -1.0 : 1.0; + axes[7] = (c < 0.0) ? -1.0f : 1.0f; } else { - axes[6] = (s < 0.0) ? -1.0 : 1.0; + axes[6] = (s < 0.0) ? -1.0f : 1.0f; axes[7] = (s < 0.0) ? -c/s : c/s; } } |