Converts a string representing
an angle into a real (floating-point) value in radians
Arguments
- string
-
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.
- units
-
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).
Examples
Command: (angtof
"45.0000")
0.785398
Command: (angtof
"45.0000" 3)
1.0177