
@c %start of fragment

@node Fixed Point Support
@chapter Fixed Point Support
Fixed Point API

@section Overview
Clutter has a fixed point API targeted at platforms without a floating point
unit, such as embedded devices. On such platforms 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.

It is no recommened for use on platforms with a floating point unit (eg desktop
systems) nor for use in bindings.

Basic rules of Fixed Point arithmethic:

@itemize 
@item
@item
@item
@item
@end itemize

Two fixed point numbers can be directly added, subtracted and have their modulus
taken.

To add other numerical type to a fixed point number it has to be first converted
to fixed point.

A fixed point number can be directly multiplied or divided by an integer.

Two fixed point numbers can only be multiplied and divided by the provided
@code{<clutter-fixed-mul>} and @code{<clutter-fixed-div>} macros.

@section Usage
@include defuns-clutter-fixed.xml.texi

@c %end of fragment
