2007-11-06 Tomas Frydrych <tf@o-hand.com>
* clutter/clutter-fixed.h: Added CLUTTER_SQRTI_ARG_MAX, CLUTTER_SQRTI_5_PERCENT, CLUTTER_SQRTI_10_PERCENT expressing clutter_sqrti limits. Stripped trailing whitespace. * clutter/clutter-fixed.c: (clutter_sqrti): Updated documentation, stripped trailing whitespace. * clutter/clutter-behaviour-path.c: (node_distance): Use clib sqrt if clutter_sqrti() precission would be worse than 10%. Stripped trailing whitespace.
This commit is contained in:
@ -608,7 +608,9 @@ clutter_sqrtx (ClutterFixed x)
|
||||
*
|
||||
* This function is about 10x faster than clib sqrt() on x86, and (this is
|
||||
* not a typo!) more than 800x faster on ARM without FPU. It's error is < 5%
|
||||
* for arguments < 132 and < 10% for arguments < 5591.
|
||||
* for arguments < #CLUTTER_SQRTI_ARG_5_PERCENT and < 10% for arguments <
|
||||
* #CLUTTER_SQRTI_ARG_10_PERCENT. The maximum argument that can be passed to
|
||||
* this function is CLUTTER_SQRTI_ARG_MAX.
|
||||
*
|
||||
* Return value: integer square root.
|
||||
*
|
||||
|
Reference in New Issue
Block a user