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

Converts an angle from degrees to radians. The result is a real number.


Examples

PRINT RAD(180)

Produces approximately 3.14159 (PI#).

PRINT RAD(90)

Produces approximately 1.570796.

REM Round-trip conversion
angle# = 270
PRINT "Radians = "; RAD(angle#)
PRINT "Degrees = "; DEG(RAD(angle#))

Notes

  • Conversion formula: radians = degrees * PI / 180.
  • Returned as a real value.
  • Useful for trigonometric functions (SIN, COS, TAN), which all expect input in radians.

See also: DEG · SIN · COS · TAN