al_fixed man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

al_fixed(3)							   al_fixed(3)

NAME
       al_fixed - Allegro 5 API

SYNOPSIS
	      #include <allegro5/allegro.h>

	      typedef int32_t al_fixed;

DESCRIPTION
       A fixed point number.

       Allegro	provides  some	routines for working with fixed point numbers,
       and defines the type al_fixed to be a signed 32-bit integer.  The  high
       word  is	 used  for the integer part and the low word for the fraction,
       giving a range of -32768 to 32767 and an accuracy of about four or five
       decimal	places.	 Fixed point numbers can be assigned, compared, added,
       subtracted, negated and shifted (for multiplying or dividing by	powers
       of two) using the normal integer operators, but you should take care to
       use the appropriate conversion routines when mixing  fixed  point  with
       integer	     or	      floating	     point	 values.       Writing
       fixed_point_1 + fixed_point_2 is OK, but fixed_point + integer is not.

       The only advantage of fixed point  math	routines  is  that  you	 don't
       require	a  floating  point coprocessor to use them.  This was great in
       the time period of i386 and i486 machines, but stopped being so	useful
       with  the  coming  of  the  Pentium  class of processors.  From Pentium
       onwards, CPUs have increased their strength in  floating	 point	opera‐
       tions, equaling or even surpassing integer math performance.

       Depending on the type of operations your program may need, using float‐
       ing point types may be faster than fixed types if you are  targeting  a
       specific machine class.	Many embedded processors have no FPUs so fixed
       point maths can be useful there.

Allegro reference manual					   al_fixed(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net