![]() |
![]()
| ![]() |
![]()
NAMEal_fixdiv - Allegro 5 API SYNOPSIS
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, Allegro’s 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 call al_set_errno(0) before calling al_fixdiv(3). Example:
RETURN VALUEReturns the result of dividing x by y. If y is zero, returns the maximum possible fixed point value and sets Allegro’s errno to ERANGE. SEE ALSOal_fixadd(3), al_fixsub(3), al_fixmul(3), al_get_errno(3).
|