16 lines
567 B
Plaintext
16 lines
567 B
Plaintext
pi = 3.141592653589793#
|
|
radians = pi / 4 'a.k.a. 45 degrees
|
|
degrees = 45 * pi / 180 'convert 45 degrees to radians once
|
|
PRINT SIN(radians) + " " + SIN(degrees) 'sine
|
|
PRINT COS(radians) + " " + COS(degrees) 'cosine
|
|
PRINT TAN(radians) + " " + TAN (degrees) 'tangent
|
|
'arcsin
|
|
thesin = SIN(radians)
|
|
arcsin = ATN(thesin / SQR(1 - thesin ^ 2))
|
|
PRINT arcsin + " " + arcsin * 180 / pi
|
|
'arccos
|
|
thecos = COS(radians)
|
|
arccos = 2 * ATN(SQR(1 - thecos ^ 2) / (1 + thecos))
|
|
PRINT arccos + " " + arccos * 180 / pi
|
|
PRINT ATN(TAN(radians)) + " " + ATN(TAN(radians)) * 180 / pi 'arctan
|