angtof

(angtof string [mode])

The angtof function converts a string interpreted as an angle based upon a given string-format for a unit mode to a floating-point number value.

The value of mode is interpreted as follows:

Mode String Format
-1 The current value of the system variable AUNITS (Angular Units) is used
-1 The current value of the command variable SetAngUnt (Set Angular Units) is used
0 Degrees
1 Degrees/minutes/seconds
2 Grads
3 Radians
4 Surveyor's units
Return Value

The function returns the result in radians.

If the argument mode is omitted, the function uses the current value of the system variable AUNITS (Angular Units).

If the argument mode is omitted, the function uses the current value of the command variable SetAngUnt (Set Angular Units).

If angtof does not succeed, it returns nil.

Example

: (angtof "31" 0)

0.5411