---
name: "al_fixtoi"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_fixtoi/3alleg5"
---

# al\_fixtoi(3alleg5)

Allegro 5 API

## NAME

al\_fixtoi - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  int al_fixtoi(al_fixed x);
  ```

## DESCRIPTION

Converts fixed point to integer, rounding as required to the nearest integer.

Example:

-

  ```
  int result;
  /* This will put 33 into `result'. */
  result = al_fixtoi(al_itofix(100) / 3);
  /* But this will round up to 17. */
  result = al_fixtoi(al_itofix(100) / 6);
  ```

## SEE ALSO

al\_itofix(3alleg5), al\_ftofix(3alleg5), al\_fixtof(3alleg5), al\_fixfloor(3alleg5), al\_fixceil(3alleg5).
