angtos function, which returns a string, and then convert that string into a floating point value with atof.
If your application needs to convert angular values from radians to degrees, you can use the(setq pt1 '(1 1) pt2 '(1 2))
(setq rad (angle pt1 pt2))
(setq deg (atof (angtos rad 0 2))) returns 90.0
Radian->Degrees function in your application. The following code shows this:
However, a more efficient method might be to include a; Convert value in radians to degrees
(defun Radian->Degrees (nbrOfRadians)
(* 180.0 (/ nbrOfRadians pi))
)
Radian->Degrees function throughout your application, as in
After this function is defined, you can use the(setq degrees (Radian->Degrees rad)) returns 90.0
You may also need to convert from degrees to radians. The following code shows this:
; Convert value in degrees to radians
(defun Degrees->Radians (numberOfDegrees)
(* pi (/ numberOfDegrees 180.0))
) ;_ end of defun