.\" Automatically generated by Pandoc 3.1.12.1 .\" .TH "al_itofix" "3" "" "Allegro reference manual" "" .SH NAME al_itofix \- Allegro 5 API .SH SYNOPSIS .IP .EX #include \f[B]\f[R] al_fixed al_itofix(int x); .EE .SH DESCRIPTION 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 \[lq]wrap around\[rq]. .PP Example: .IP .EX al_fixed number; \f[I]/* This conversion is OK. */\f[R] number = al_itofix(100); assert(al_fixtoi(number) == 100); number = al_itofix(64000); \f[I]/* This check will fail in debug builds. */\f[R] assert(al_fixtoi(number) == 64000); .EE .SH RETURN VALUE Returns the value of the integer converted to fixed point ignoring overflows. .SH SEE ALSO al_fixtoi(3), al_ftofix(3), al_fixtof(3).