linux man page for ftofix

Query: ftofix

OS: linux

Section: 3alleg4

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

ftofix(3alleg4) 						  Allegro manual						   ftofix(3alleg4)

NAME
ftofix - Converts a floating point value to fixed point. Allegro game programming library.
SYNOPSIS
#include <allegro.h> fixed ftofix(double x);
DESCRIPTION
Converts a floating point value to fixed point. Unlike itofix(), this function clamps values which could overflow the type conversion, set- ting `errno' to ERANGE in the process if this happens. Example: fixed number; number = itofix(-40000); ASSERT(fixfloor(number) == -32768); number = itofix(64000); ASSERT(fixfloor(number) == 32767); ASSERT(!errno); /* This will fail. */
RETURN VALUE
Returns the value of the floating point value converted to fixed point clamping overflows (and setting `errno').
SEE ALSO
fixtof(3alleg4), itofix(3alleg4), fixtoi(3alleg4), exfixed(3alleg4), exrotscl(3alleg4), exspline(3alleg4), exupdate(3alleg4) Allegro version 4.4.2 ftofix(3alleg4)
Related Man Pages
itofix(3alleg4) - debian
itofix(3alleg4) - suse
ftofix(3alleg4) - suse
ftofix(3alleg4) - netbsd
ftofix(3alleg4) - redhat
Similar Topics in the Unix Linux Community
C programming - Urgent help required
AIX chlicense ...
Help for coding this programme
Class Pointer initialization C++