Fixed unsigned overflow in sine alpha functions

This commit is contained in:
Tomas Frydrych 2007-06-11 15:47:26 +00:00
parent c22543be1f
commit 5f8bd1d160
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2007-06-11 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-alpha.c:
(clutter_alpha_sine_inc):
(clutter_alpha_sine_dec):
(clutter_alpha_sine_half):
Fixed unsigned overflow.
2007-06-11 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-event.h: Add full modifier masks enums.

View File

@ -629,7 +629,7 @@ clutter_sine_inc_func (ClutterAlpha *alpha,
sine = clutter_sini (x) * CLUTTER_ALPHA_MAX_ALPHA;
return CFX_INT (sine);
return ((guint32)sine) >> CFX_Q;
}
/**
@ -663,7 +663,7 @@ clutter_sine_dec_func (ClutterAlpha *alpha,
sine = clutter_sini (x) * CLUTTER_ALPHA_MAX_ALPHA;
return CFX_INT (sine);
return ((guint32)sine) >> CFX_Q;
}
/**
@ -697,7 +697,7 @@ clutter_sine_half_func (ClutterAlpha *alpha,
sine = clutter_sini (x) * CLUTTER_ALPHA_MAX_ALPHA;
return CFX_INT (sine);
return ((guint32)sine) >> CFX_Q;
}
/**