converts clutter_{sin,cos,tan,atan}x angles to radians before calling math.h func
authorRobert Bragg <robert@linux.intel.com>
Thu, 8 Jan 2009 22:00:56 +0000 (22:00 +0000)
committerRobert Bragg <robert@linux.intel.com>
Mon, 12 Jan 2009 17:13:58 +0000 (17:13 +0000)
These functions are defined to take an angle in degrees, so the angle needs
converting before calling the corresponding {sin,cos,tan,atan}f()

This fixes test-cogl-tex-tile.

fixed-to-float-patches/clutter-fixed.h.0.patch

index 0b4cc2f..fc7bb55 100644 (file)
@@ -305,11 +305,11 @@ index 3ae0916..5d150da 100644
 -#define clutter_log2x(x)                cogl_fixed_log2 ((x))
 -#define clutter_pow2x(x)                cogl_fixed_pow2 ((x))
 -#define clutter_powx(x,y)               cogl_fixed_pow ((x), (y))
-+#define clutter_sinx(a)                 sinf (a)
-+#define clutter_tanx(a)                 tanf (a)
-+#define clutter_atanx(a)                atanf (a)
++#define clutter_sinx(a)                 sinf (a * (G_PI/180.0))
++#define clutter_tanx(a)                 tanf (a * (G_PI/180.0))
++#define clutter_atanx(a)                atanf (a * (G_PI/180.0))
 +#define clutter_atan2x(x,y)             atan2f (x, y)
-+#define clutter_cosx(a)                 cosf (a)
++#define clutter_cosx(a)                 cosf (a * (G_PI/180.0))
  
  #define CLUTTER_TYPE_FIXED                 (clutter_fixed_get_type ())
  #define CLUTTER_TYPE_PARAM_FIXED           (clutter_param_fixed_get_type ())