![]() |
FixDiv |
||||
Header: | FixMath.h | Carbon status: | Supported | |
Divides two variables of the same type (Fixed, Fract, or LongInt) or to divide a LongInt or Fract number by a Fixed number.
Fixed FixDiv ( Fixed x, Fixed y );
The first operand, which can be a variable of type Fixed or a variable of type Fract or LongInt.
The second operand, which can be a variable of type Fixed or it can be a variable of the same type as the variable in parameter a.
The quotient of the numbers in a and b. If the b parameter is in the format of a Fixed number, then the a parameter can be in the format of a Fixed, Fract, or LongInt number. If the b parameter is in the format of a Fract or LongInt number, then the a parameter must be in the same format.
The returned value is in the format of a Fixed number if both a and b are both Fixed numbers, both Fract numbers, or both LongInt numbers. Otherwise, the returned value is the same type as the number in the a parameter.
Division by zero results in $8000000 if a is negative, and $7FFFFFFF otherwise; thus the special case 0/0 yields $7FFFFFFF.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)