Amos Professional Manual  Contents  Index

Maths


DEGREE
instruction: use degrees
Degree

If, for any reason, you are unhappy with the complexities of radians, AMOS Professional is happy to accept your trigonometric instructions in degrees. Once the DEGREE command has been activated, all subsequent calls to the trigonometric functions will expect degrees to be used.

E> Degree
   Print Sin(45)

RADIAN
instruction: use radians
Radian

If DEGREE has already been called, the RADIAN function returns to the default status, where all future angles are expected to be entered in radians.

SIN
function: calculate sine of an angle
s#=Sin(angle)
s#=Sin(angle#)

The SIN function calculates how far point b is above the x-axis, known as the sine of the angle a.
Note that SIN always returns a floating point number. For example:

E> Degree
   For X=0 To 319
    Y#=Sin(X)
    Plot X,Y#*50+100
   Next X

COS
function: calculate cosine of an angle
c#=Cos(angle)
c#=Cos(angle#)

In the above diagram, the distance that point b is to the right of the y-axis is known as the cosine. If b goes to the left of the y-axis, its cosine value becomes negative. (Similarly, if it drops below the x-axis, its sine value is negative.) The COS function gives the cosine of a given angle.
To demonstrate this, add the following two lines to your last example between the PLOT and NEXT instructions:

E> Y#=Cos(X)
   Plot X,Y#*50+100
Back    Next
05.03.08