|
|
1.1 ! root 1: .TH ITRIG 3L "630 MTG" ! 2: .XE "cos()" ! 3: .XE "sin()" ! 4: .XE "atan2()" ! 5: .SH NAME ! 6: itrig: Icos, Isin, Iatan2 \- cosine, sine and arc tangent trigonometric functions ! 7: .SH SYNOPSIS ! 8: \f3 ! 9: int Icos (d) ! 10: .sp ! 11: int Isin (d) ! 12: .sp ! 13: int Iatan2 (x, y) ! 14: .sp ! 15: .br ! 16: int d; ! 17: .br ! 18: int x, y; ! 19: .SH DESCRIPTION ! 20: The ! 21: .I Icos ! 22: and ! 23: .I Isin ! 24: functions ! 25: return scaled integer approximations to the trigonometric functions. ! 26: The argument values are in degrees. ! 27: The values returned are scaled so that ! 28: .BR Icos(0)==1024 . ! 29: .PP ! 30: The ! 31: .I Iatan2 ! 32: function ! 33: returns the approximate arc-tangent of ! 34: .I y/x. ! 35: The return value is in integral degrees. ! 36: The error in approximation may be as large as five degrees. ! 37: .SH EXAMPLE ! 38: These routines can be used to calculate mathematical expressions such as: ! 39: .sp ! 40: .ce ! 41: .ft CM ! 42: x=x0*Icos(d) ! 43: .sp ! 44: .ft R ! 45: or to calculate a projection: ! 46: .sp ! 47: .ce ! 48: .ft CM ! 49: x=muldiv(x0, Icos(d), 1024) ! 50: .ft R ! 51: .sp ! 52: Note, the multiplication must be scaled. ! 53: .SH SEE ALSO ! 54: muldiv(3L).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.