1fixtoi(3)                       Allegro manual                       fixtoi(3)
2
3
4

NAME

6       fixtoi  - Converts a fixed point to integer with rounding. Allegro game
7       programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       int fixtoi(fixed x);
14

DESCRIPTION

16       Converts fixed point to integer, rounding as required  to  the  nearest
17       integer. Example:
18
19          int result;
20          /* This will put 33 into `result'. */
21          result = fixtoi(itofix(100) / 3);
22          /* But this will round up to 17. */
23          result = fixtoi(itofix(100) / 6);
24
25

SEE ALSO

27       itofix(3),  ftofix(3),  fixtof(3), fixfloor(3), fixceil(3), ex12bit(3),
28       ex3buf(3), ex3d(3), exblend(3), excustom(3), exlights(3),  exspline(3),
29       exstars(3), exupdate(3)
30
31
32
33Allegro                          version 4.4.2                       fixtoi(3)
Impressum