cos cosine in degrees

cos x computes the cosine of the angle x, where x is measured in degrees:

write cos 90

To compute the cosine in radians, you can use Math.cos instead:

write Math.cos PI/2

Other trigonometric functions include sin and tan.