2006-11-17 13:45:31 -05:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
clutter-fixed
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2006-12-05 00:16:03 -05:00
|
|
|
Fixed point API
|
2006-11-17 13:45:31 -05:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
2006-12-05 00:16:03 -05:00
|
|
|
Clutter has a fixed point API targeted at platforms without a floating
|
|
|
|
point unit, such as embedded devices. This API should be preferred to
|
|
|
|
the floating point one as it does not trigger the slow path of software
|
|
|
|
emulation, relying on integer math for fixed-to-floating and
|
|
|
|
floating-to-fixed conversion.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### TYPEDEF ClutterFixed ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CFX_Q ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Number of bits used to store fractional part of #ClutterFixed.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CFX_ONE ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
#ClutterFixed representation of 1.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CFX_MAX ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Maximum number representable by #ClutterFixed.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CFX_MIN ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Minumum number representable by #ClutterFixed.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-16 09:37:54 -05:00
|
|
|
<!-- ##### TYPEDEF ClutterAngle ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CFX_PI ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
#ClutterFixed representation of Pi.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CFX_2PI ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
#ClutterFixed representation of 2 * Pi.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CFX_PI_2 ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
#ClutterFixed representation of Pi/2.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CFX_PI_4 ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
#ClutterFixed representation of Pi/4.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CFX_120 ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
#ClutterFixed representation of 120.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CFX_180 ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
#ClutterFixed representation of 180.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CFX_240 ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
#ClutterFixed representation of 240.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CFX_360 ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
#ClutterFixed representation of 360.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CFX_60 ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
#ClutterFixed representation of 60.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-17 08:51:14 -05:00
|
|
|
<!-- ##### MACRO CFX_255 ##### -->
|
2007-01-16 09:37:54 -05:00
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
#ClutterFixed representation of 255.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-17 08:51:14 -05:00
|
|
|
<!-- ##### MACRO CFX_DIV ##### -->
|
2007-01-16 09:37:54 -05:00
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Alias for #CLUTTER_FIXED_DIV.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-17 08:51:14 -05:00
|
|
|
<!-- ##### MACRO CFX_INT ##### -->
|
2007-01-16 09:37:54 -05:00
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Alias for #CLUTTER_FIXED_INT.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-17 08:51:14 -05:00
|
|
|
<!-- ##### MACRO CFX_MUL ##### -->
|
2007-01-16 09:37:54 -05:00
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Alias for #CLUTTER_FIXED_MUL.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-11-17 13:45:31 -05:00
|
|
|
<!-- ##### MACRO CLUTTER_FIXED_TO_FLOAT ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Macro for converting #ClutterFixed to single precission floating point.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
2007-01-17 11:00:00 -05:00
|
|
|
@x: #ClutterFixed
|
2006-11-17 13:45:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CLUTTER_FIXED_TO_DOUBLE ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Macro for converting #ClutterFixed to double precission floating point.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
2007-01-17 11:00:00 -05:00
|
|
|
@x: #ClutterFixed
|
2006-11-17 13:45:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CLUTTER_FLOAT_TO_FIXED ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Macro for converting floating point numbers to #ClutterFixed.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
2007-01-17 11:00:00 -05:00
|
|
|
@x: double or float
|
2006-11-17 13:45:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CLUTTER_INT_TO_FIXED ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Macro for converting integers to #ClutterFixed.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
2007-01-17 11:00:00 -05:00
|
|
|
@x: int
|
2006-11-17 13:45:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CLUTTER_FIXED_INT ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Macro to obtain integer part of #ClutterFixed.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
2007-01-17 11:00:00 -05:00
|
|
|
@x: #ClutterFixed
|
2006-11-17 13:45:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CLUTTER_FIXED_FRACTION ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Macro to obtain the fraction of #ClutterFixed.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
2007-01-17 11:00:00 -05:00
|
|
|
@x: #ClutterFixed
|
2006-11-17 13:45:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CLUTTER_FIXED_FLOOR ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Macro to obtain greatest integer smaller than given #ClutterFixed.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
2007-01-17 11:00:00 -05:00
|
|
|
@x: #ClutterFixed
|
2006-11-17 13:45:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CLUTTER_FIXED_CEIL ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Macro to obtain smallest integer greater than given #ClutterFixed.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
2007-01-17 11:00:00 -05:00
|
|
|
@x: #ClutterFixed
|
2006-11-17 13:45:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CLUTTER_FIXED_MUL ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Macro for multiplication of two #ClutterFixed numbers.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
2007-01-17 11:00:00 -05:00
|
|
|
@x: #ClutterFixed
|
|
|
|
@y: #ClutterFixed
|
2006-11-17 13:45:31 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO CLUTTER_FIXED_DIV ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Macro for difvision of two #ClutterFixed numbers.
|
2006-11-17 13:45:31 -05:00
|
|
|
</para>
|
|
|
|
|
2007-01-17 11:00:00 -05:00
|
|
|
@x: #ClutterFixed
|
|
|
|
@y: #ClutterFixed
|
2006-11-17 13:45:31 -05:00
|
|
|
|
|
|
|
|
2007-01-17 08:51:14 -05:00
|
|
|
<!-- ##### MACRO clutter_cosi ##### -->
|
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Very fast fixed point cosine function.
|
2007-01-17 08:51:14 -05:00
|
|
|
</para>
|
|
|
|
|
2007-01-17 11:00:00 -05:00
|
|
|
@x: #ClutterAngle
|
2007-01-17 08:51:14 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO clutter_cosx ##### -->
|
2007-01-16 09:37:54 -05:00
|
|
|
<para>
|
2007-01-17 11:00:00 -05:00
|
|
|
Fast fixed point cosine function.
|
2007-01-16 09:37:54 -05:00
|
|
|
</para>
|
|
|
|
|
2007-01-17 11:00:00 -05:00
|
|
|
@x: #ClutterFixed
|
2007-01-16 09:37:54 -05:00
|
|
|
|
|
|
|
|
2007-01-17 08:51:14 -05:00
|
|
|
<!-- ##### FUNCTION clutter_sini ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@angle:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION clutter_sinx ##### -->
|
2007-01-16 09:37:54 -05:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@angle:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2007-01-17 08:51:14 -05:00
|
|
|
<!-- ##### FUNCTION clutter_sqrti ##### -->
|
2007-01-16 09:37:54 -05:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@x:
|
2007-01-17 08:51:14 -05:00
|
|
|
@Returns:
|
2007-01-16 09:37:54 -05:00
|
|
|
|
|
|
|
|
2007-01-17 08:51:14 -05:00
|
|
|
<!-- ##### FUNCTION clutter_sqrtx ##### -->
|
2007-01-16 09:37:54 -05:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2007-01-17 08:51:14 -05:00
|
|
|
@x:
|
2007-01-16 09:37:54 -05:00
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|