sin x computes the sine of the angle x, where x is measured in degrees:

sin x

x

write sin 90

To compute the sine in radians, you can use Math.sin instead:

Math.sin

write Math.sin PI/2

Other trigonometric functions include cos and tan.

cos

tan