Trigonometric functions
 
Syntax


#define include_trig
#include <AB_Math.bas>

sin ( radians)

cos ( radians )

tan ( radians )

Description


Part of a user contributed library that computes the standard trigonometric functions.

Example

#define include_trig
#include <AB_Math.bas>

for i=0 to 90 step 10
   print i,sin(_deg2rad *i),cos(_deg2rad *i),tan((_deg2rad *i)
next i



The output would look like:
0 0.000000 1.0000000 0.000000
10 0.1736482 0.9848078 0.1763270
20 0.3420201 0.9396926 0.3639701
30 0.5000000 0.8660253 0.5773502
40 0.6427875 0.7660430 0.8390993
50 0.7660430 0.6427875 1.191754
60 0.8660253 0.5000000 1.732051
70 0.9396926 0.3420202 2.747478
80 0.9848078 0.1736483 5.671279
90 1.0000000 0.000000 Inf



 

See also