![]() |
![]()
| ![]() |
![]()
NAMEfixdiv - Fixed point division. Allegro game programming library. SYNOPSIS#include <allegro.h> fixed fixdiv(fixed x, fixed y); DESCRIPTIONA fixed point value can be divided by an integer with the normal `/' operator. To divide two fixed point values, though, you must use this function. If a division by zero occurs, `errno' will be set and the maximum possible value will be returned, but `errno' is not cleared if the operation is successful. This means that if you are going to test for division by zero you should set `errno=0' before calling fixdiv(). Example:
RETURN VALUEReturns the result of dividing `x' by `y'. If `y' is zero, returns the maximum possible fixed point value and sets `errno' to ERANGE. SEE ALSOfixadd(3), fixsub(3), fixmul(3), exfixed(3)
|