GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
itofix(3) Allegro manual itofix(3)

itofix - Converts an integer to fixed point. Allegro game programming library.

#include <allegro.h>

fixed itofix(int x);

Converts an integer to fixed point. This is the same thing as x<<16. Remember that overflows (trying to convert an integer greater than 32767) and underflows (trying to convert an integer lesser than -32768) are not detected even in debug builds! The values simply "wrap around". Example:

   fixed number;
   /* This conversion is OK. */
   number = itofix(100);
   ASSERT(fixtoi(number) == 100);
   number = itofix(64000);
   /* This check will fail in debug builds. */
   ASSERT(fixtoi(number) == 64000);

Returns the value of the integer converted to fixed point ignoring overflows.

fixtoi(3), ftofix(3), fixtof(3), ex12bit(3), ex3buf(3), ex3d(3), exblend(3), excustom(3), exfixed(3), exlights(3), exspline(3), exsprite(3), exstars(3)
version 4.4.3 Allegro

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.