Bug 985 - MSC math.h / M_PI issue
authorNeil Roberts <neil@openedhand.com>
Mon, 30 Jun 2008 16:15:53 +0000 (16:15 +0000)
committerNeil Roberts <neil@openedhand.com>
Mon, 30 Jun 2008 16:15:53 +0000 (16:15 +0000)
* clutter/cogl/gl/cogl.c (set_clip_plane):
* clutter/clutter-alpha.c (sinc_func): Use G_PI instead of M_PI
because M_PI isn't defined in MSVC without a special
#define. Thanks to Haakon Sporsheim

ChangeLog
clutter/clutter-alpha.c
clutter/cogl/gl/cogl.c

index 6675348..1070fab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2008-06-30  Neil Roberts  <neil@o-hand.com>
 
+       Bug 985 - MSC math.h / M_PI issue
+
+       * clutter/cogl/gl/cogl.c (set_clip_plane): 
+       * clutter/clutter-alpha.c (sinc_func): Use G_PI instead of M_PI
+       because M_PI isn't defined in MSVC without a special
+       #define. Thanks to Haakon Sporsheim
+
+2008-06-30  Neil Roberts  <neil@o-hand.com>
+
        * clutter/win32/clutter-backend-win32.c (check_vblank_env): Use
        g_ascii_strcasecmp instead of strcasecmp because strcasecmp isn't
        available in MSVC.
index 685d3fb..b1a4061 100644 (file)
@@ -633,8 +633,8 @@ sinc_func (ClutterAlpha *alpha,
 
   /* FIXME: fixed point, and fixed point sine() */
 
-  x = (gdouble) (current_frame_num * angle * M_PI) / n_frames ;
-  sine = (sin (x - (M_PI / angle)) + offset) * 0.5f;
+  x = (gdouble) (current_frame_num * angle * G_PI) / n_frames ;
+  sine = (sin (x - (G_PI / angle)) + offset) * 0.5f;
 
   CLUTTER_NOTE (ALPHA, "sine: %2f\n",sine);
 
index f594c85..f79d231 100644 (file)
@@ -420,7 +420,7 @@ set_clip_plane (GLint plane_num,
   /* Calculate the angle between the axes and the line crossing the
      two points */
   angle = atan2f ((vertex_b[1] - vertex_a[1]),
-                 (vertex_b[0] - vertex_a[0])) * 180.0f / M_PI;
+                 (vertex_b[0] - vertex_a[0])) * 180.0f / G_PI;
 
   GE( glPushMatrix () );
   /* Load the identity matrix and multiply by the reverse of the