Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /
Chapter 3 - Mathematical and Logical Utilities / Mathematical and Logical Utilities Reference
Routines / Performing Calculations on Fixed-Point Numbers


FracSin

You can use the FracSin function to obtain a fast approximation of the sine of a Fixed number.

FUNCTION FracSin (x: Fixed): Fract;
x
The Fixed number expressed in radians, whose sine is to be calculated.
DESCRIPTION
The FracSin function returns the sine, expressed in radians, of the Fixed number x.

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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996

Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice