Fix clutter_sinx for angles > CFX_2PI - CFX_ONE. Also add note to
documentation about being able to use modulus with ClutterFixed
+2008-06-25 Chris Lord <chris@openedhand.com>
+
+ * clutter/clutter-fixed.c: (clutter_sinx):
+ Fix clutter_sinx for angles > CFX_2PI - CFX_ONE. Also add note to
+ documentation about being able to use modulus with ClutterFixed
+
2008-06-25 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-backend.h:
*
* <itemizedlist>
* <listitem>
- * <para>Two fixed point numbers can be directly added and
- * subtracted.</para>
+ * <para>Two fixed point numbers can be directly added,
+ * subtracted and have their modulus taken.</para>
* </listitem>
* <listitem>
* <para>To add other numerical type to a fixed point number it has to
}
/* reduce to <0, 2*pi) */
- if (angle >= CFX_2PI)
- {
- ClutterFixed f = CLUTTER_FIXED_DIV (angle, CFX_2PI);
- angle = angle - f;
- }
+ angle = angle % CFX_2PI;
/* reduce to first quadrant and sign */
if (angle > CFX_PI)