2007-01-18 Tomas Frydrych <tf@openedhand.com>

* clutter/clutter-fixed.h:
	* clutter/clutter-fixed.c:
	Added CLUTTER_QDIV() for 64-bit division (bug 564, patch by
	Gwenole Beauchesne).
This commit is contained in:
Tomas Frydrych 2008-01-18 12:17:41 +00:00
parent a68067b06c
commit e833356561
3 changed files with 29 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2007-01-18 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-fixed.h:
* clutter/clutter-fixed.c:
Added CLUTTER_QDIV() for 64-bit division (bug 564, patch by
Gwenole Beauchesne).
2008-01-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-event.h: Add a gunichar field for the Unicode
@ -39,7 +46,7 @@
* clutter/clutter-effect.h:
* clutter/clutter-effect.c (clutter_effect_scale): Split the
final scale factor to match the ClutterBehaviourScale changes. (#709)
* tests/test-actors.c:
* tests/test-effects.c:
* tests/test-rotate.c:
@ -190,7 +197,7 @@
* clutter/clutter-model.c:
(clutter_model_appendv),
(clutter_model_prependv): Add vector based API for bindings.
(clutter_model_get_column_name),
(clutter_model_get_column_type),
(clutter_model_set_sorting_column): Fix the check in the condition
@ -203,7 +210,7 @@
2008-01-04 Emmanuele Bassi <ebassi@openedhand.com>
* clutter.symbols: Add clutter_actor_move_byu()
* clutter/clutter-actor.h:
* clutter/clutter-actor.c:
(clutter_actor_move_by),

View File

@ -741,6 +741,24 @@ clutter_qmulx (ClutterFixed op1, ClutterFixed op2)
#endif
}
/**
* clutter_fixed_qdivx:
* @op1: #ClutterFixed
* @op2: #ClutterFixed
*
* Return value: #ClutterFixed.
*
* Divides two fixed values using 64bit arithmetic; this provides
* significantly better precission than the #CLUTTER_FIXED_DIV macro,
* but at performance cost.
*
* Since: 0.4
*/
ClutterFixed
clutter_qdivx (ClutterFixed op1, ClutterFixed op2)
{
return (ClutterFixed)((((gint64)op1) << CFX_Q) / op2);
}
/*
* The log2x() and pow2x() functions

View File

@ -274,6 +274,7 @@ typedef gint32 ClutterAngle; /* angle such that 1024 == 2*PI */
#define CFX_MUL CLUTTER_FIXED_MUL
#define CFX_DIV CLUTTER_FIXED_DIV
#define CFX_QMUL(x,y) clutter_qmulx (x,y)
#define CFX_QDIV(x,y) clutter_qdivx (x,y)
/*< public >*/
/* Fixed point math routines */