ITRIG(3L)

NAME
itrig: Icos, Isin, Iatan2 - cosine, sine and arc tangent trigonometric functions

SYNOPSIS
int Icos (d)

int Isin (d)

int Iatan2 (x, y)

int d;
int x, y;

DESCRIPTION
The Icos and Isin functions return scaled integer approximations to the trigonometric functions. The argument values are in degrees. The values returned are scaled so that Icos(0)==1024.

The Iatan2 function returns the approximate arc-tangent of y/x. The return value is in integral degrees. The error in approximation may be as large as five degrees.

EXAMPLE
These routines can be used to calculate mathematical expressions such as:

x=x0*Icos(d)

or to calculate a projection:

x=muldiv(x0, Icos(d), 1024)

Note, the multiplication must be scaled.

SEE ALSO
muldiv(3L).