Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ftofix(3alleg4) [v7 man page]

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)

Check Out this Related Man Page

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)
Man Page

4 More Discussions You Might Find Interesting

1. Programming

C programming - Urgent help required

Hi, I am writing a small 'C' program to add very large floating point numbers. Now the program should be capable of adding the maximum floating point number that is possible on Sun Solaris machine. Can some let me know whether there is any extra logic that needs to applied for making sure... (2 Replies)
Discussion started by: kkumar1975
2 Replies

2. AIX

AIX chlicense ...

I couldn't find any hints on how floating and fixed licenses should behave on AIX 4.3 The problem we got here is this: there are 85 fixed user licenses. We ran out of them. I increased the number fixed licenses to 150. Since it requires a reboot I added 50 floating licenses with smit. (can't... (0 Replies)
Discussion started by: osee
0 Replies

3. Programming

Help for coding this programme

for a floating-point array x whose size is n, find the geometric mean.. GM =n x1.x2.x3...xn (2 Replies)
Discussion started by: allyjaah
2 Replies

4. Programming

Class Pointer initialization C++

Hello everyone, I have a question, that are the following ways of pointer intialization same ? ClassA *point; point = 0; point = new ClassA; Thanks a load in advance!! Regards, (10 Replies)
Discussion started by: mind@work
10 Replies