float -> fixed point

This commit is contained in:
Tomas Frydrych 2007-01-17 13:25:51 +00:00
parent 9a28ac34cd
commit cbe5c47090
2 changed files with 5 additions and 7 deletions

View File

@ -10,6 +10,10 @@
* clutter/clutter-behavior.c:
replaced call to sqrt() with clutter_sqrti()
* clutter/clutter-behavior-scale.c:
(clutter_behaviour_scale_alpha_notify):
Replaced floating point math with fixed point.
2007-01-16 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-feature.c: Use clutter_vblank_method() to

View File

@ -136,13 +136,7 @@ clutter_behaviour_scale_alpha_notify (ClutterBehaviour *behave,
priv = CLUTTER_BEHAVIOUR_SCALE (behave)->priv;
/* FIXME: use all fixed if possible
factor = CLUTTER_FIXED_DIV(CLUTTER_INT_TO_FIXED(alpha/2),
CLUTTER_INT_TO_FIXED(CLUTTER_ALPHA_MAX_ALPHA/2));
*/
factor = CLUTTER_FLOAT_TO_FIXED ((gdouble) alpha_value / CLUTTER_ALPHA_MAX_ALPHA);
factor = CLUTTER_INT_TO_FIXED (alpha_value) / CLUTTER_ALPHA_MAX_ALPHA;
scale = CLUTTER_FIXED_MUL (factor, (priv->scale_end - priv->scale_begin));
scale += priv->scale_begin;