std-dtr, std-rtd


Synopsis

(std-dtr <degree>) ; "Degree to radians"

(std-rtd <radians>) ; "Radians to degree"

Description

std-dtr converts an angle in degree notation to radians.

std-rtd converts an angle in radian notation to degrees.

Degrees are counted from 0 to 360 and radians from 0 to 2*PI.

The range of the result is not limited to the range 0 - 2*PI resp 0 to 360. It may be negative or greater, dependent on the range of the argument.

std-dtr is a convenient way to read and write angles in code which requires radians.

std-dtr may be used, besides angtos, to convert results in radians to degrees

Example

(std-dtr 90)  =>
(std-rtd *PI2*)  => 360.0

Arguments

radians: a real number

degree: a real number

Return Value

A real number

Side Effects

None

Module

(std-require 'STDMATH)

Defined in STDMATH