|
|
researchv10 Dan Cross
.TH ITRIG 3L "630 MTG" .XE "cos()" .XE "sin()" .XE "atan2()" .SH NAME itrig: Icos, Isin, Iatan2 \- cosine, sine and arc tangent trigonometric functions .SH SYNOPSIS \f3 int Icos (d) .sp int Isin (d) .sp int Iatan2 (x, y) .sp .br int d; .br int x, y; .SH DESCRIPTION The .I Icos and .I Isin functions return scaled integer approximations to the trigonometric functions. The argument values are in degrees. The values returned are scaled so that .BR Icos(0)==1024 . .PP The .I Iatan2 function returns the approximate arc-tangent of .I y/x. The return value is in integral degrees. The error in approximation may be as large as five degrees. .SH EXAMPLE These routines can be used to calculate mathematical expressions such as: .sp .ce .ft CM x=x0*Icos(d) .sp .ft R or to calculate a projection: .sp .ce .ft CM x=muldiv(x0, Icos(d), 1024) .ft R .sp Note, the multiplication must be scaled. .SH SEE ALSO muldiv(3L).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.