Update of /cvsroot/simspark/simspark/spark/salt
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29507
Modified Files:
Tag: WIN32
gmath.h
Log Message:
- define M_PI and M_PI_2
Index: gmath.h
===================================================================
RCS file: /cvsroot/simspark/simspark/spark/salt/gmath.h,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** gmath.h 10 Feb 2006 10:12:19 -0000 1.2
--- gmath.h 9 Feb 2007 16:09:52 -0000 1.2.2.1
***************
*** 40,43 ****
--- 40,51 ----
#endif
+ #ifndef M_PI
+ #define M_PI 3.1415926535897932384626433832795
+ #endif
+
+ #ifndef M_PI_2
+ #define M_PI_2 1.57079632679489661923132169164 /* pi/2 */
+ #endif
+
// better directly use the cmath constants
static const double gPI = M_PI; // was ((float)3.1415926535);
***************
*** 159,163 ****
f_inline TYPE gRadToDeg(TYPE rad)
{
! return (static_cast<TYPE>(rad)) * (180.0 / M_PI);
}
--- 167,171 ----
f_inline TYPE gRadToDeg(TYPE rad)
{
! return (static_cast<TYPE>(rad * (180.0 / M_PI)));
}
|