Retro Rocket OS
BASIC-Powered Operating System
Loading...
Searching...
No Matches
SIN Function
SIN(real-expression)

Returns the sine of the given angle, where the angle is expressed in radians.


Examples

PRINT SIN(0)

Produces 0.

PRINT SIN(PI# / 2)

Produces 1.

PRINT SIN(PI#)

Produces approximately 0.

REM Compute vertical component of a vector
length# = 10
angle# = RAD(30)
dy# = length# * SIN(angle#)
PRINT "Vertical component = "; dy#

Notes

  • Argument must be in radians. Convert from degrees with:

    radians# = degrees * PI# / 180
  • Result is a real number between -1 and 1.
  • Inverse function: ASN.

See also: COS · TAN · ASN · ATAN