![]() |
FixATan2 |
||||
Header: | FixMath.h | Carbon status: | Supported | |
Obtains a fast approximation of the arctangent of a fraction.
Fixed FixATan2 ( SInt32 x, SInt32 y );
The numerator of the fraction whose arctangent is to be obtained. This variable can be a LongInt, Fixed, or Fract number.
The denominator of the fraction whose arctangent is to be obtained. The number supplied in this variable must be of the same type as that of the number supplied in the x parameter.
The arctangent of y/x, in radians.0
The approximation of Pi/4 used to compute the arctangent is the hexadecimal value 0.C910, making the approximation of Pi equal to 3.1416015625, while Pi itself equals 3.14159265.... Thus FixATan2(1, 1)equals the equivalent of the hexadecimal value 0.C910. Despite the approximation of Pi, the arctangent value obtained will usually be correct to several decimal places.
Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.
© 2000 Apple Computer, Inc. (Last Updated 4/14/2000)