Carbon


FracSin

Header: FixMath.h Carbon status: Supported

Obtains a fast approximation of the sine of a Fixed number.

Fract FracSin (
    Fixed x
);
Parameter descriptions
x

The Fixed number expressed in radians, whose sine is to be calculated.

function result

The sine, expressed in radians, of the Fixed number x.

DISCUSSION

The approximation of Pi/4 used to compute the sine is the hexadecimal value 0.C910, making the approximation of Pi equal to 3.1416015625, while Pi itself equals 3.14159265.... Despite the approximation of Pi, the sine value obtained is usually correct to several decimal places.

AVAILABILITY

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)