converts clutter_{sin,cos,tan,atan}x angles to radians before calling math.h func

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.
This commit is contained in:
Robert Bragg 2009-01-08 22:00:56 +00:00
parent 012b169a73
commit ec403b2805

View File

@ -305,11 +305,11 @@ index 3ae0916..5d150da 100644
-#define clutter_log2x(x) cogl_fixed_log2 ((x)) -#define clutter_log2x(x) cogl_fixed_log2 ((x))
-#define clutter_pow2x(x) cogl_fixed_pow2 ((x)) -#define clutter_pow2x(x) cogl_fixed_pow2 ((x))
-#define clutter_powx(x,y) cogl_fixed_pow ((x), (y)) -#define clutter_powx(x,y) cogl_fixed_pow ((x), (y))
+#define clutter_sinx(a) sinf (a) +#define clutter_sinx(a) sinf (a * (G_PI/180.0))
+#define clutter_tanx(a) tanf (a) +#define clutter_tanx(a) tanf (a * (G_PI/180.0))
+#define clutter_atanx(a) atanf (a) +#define clutter_atanx(a) atanf (a * (G_PI/180.0))
+#define clutter_atan2x(x,y) atan2f (x, y) +#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_FIXED (clutter_fixed_get_type ())
#define CLUTTER_TYPE_PARAM_FIXED (clutter_param_fixed_get_type ()) #define CLUTTER_TYPE_PARAM_FIXED (clutter_param_fixed_get_type ())