Converts a string representing an angle into a real (floating-point) value in radians

(angtof string [units])



A string describing an angle based on the format specified by the mode argument. The string must be a string that angtof can parse correctly to the specified unit. It can be in the same form that angtos returns, or in a form that AutoCAD allows for keyboard entry.


Specifies the units in which the string is formatted. The value should correspond to values allowed for the AutoCAD system variable AUNITS in the Command Reference. If unit is omitted, angtof uses the current value of AUNITS. The following units may be specified:

0 -- Degrees

1 -- Degrees/minutes/seconds

2 -- Grads

3 -- Radians

4 -- Surveyor's units

Return Values

A real value, if successful; otherwise nil.

The angtof and angtos functions are complementary: if you pass angtof a string created by angtos, angtof is guaranteed to return a valid value, and vice versa (assuming the unit values match).


Command: (angtof "45.0000")


Command: (angtof "45.0000" 3)


See Also