diff --git a/ChangeLog b/ChangeLog index f162f39ae..47fcec649 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-25 Chris Lord + + * 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 * clutter/clutter-backend.h: diff --git a/clutter/clutter-fixed.c b/clutter/clutter-fixed.c index 5ed765868..22a38aa1f 100644 --- a/clutter/clutter-fixed.c +++ b/clutter/clutter-fixed.c @@ -50,8 +50,8 @@ * * * - * Two fixed point numbers can be directly added and - * subtracted. + * Two fixed point numbers can be directly added, + * subtracted and have their modulus taken. * * * To add other numerical type to a fixed point number it has to @@ -264,11 +264,7 @@ clutter_sinx (ClutterFixed angle) } /* 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)