Jump to content

Recommended Posts

Posted

I can get the TAN value of the angle 300/1125 = 0.266666667  Now how can I get the  Angle  in digress or in radians by LISP.

Posted
  • To convert from degrees to radians, you would divide by 180 and multiply by pi.
  • To convert from radians to degrees, you would divide by pi and multiply by 180.

Such functions may be defined in the following way:

(defun dtr ( a ) (* pi (/ a 180.0)))
(defun rtd ( a ) (* 180.0 (/ a pi)))

Provided with a tangent of 0.26 recurring, you can obtain the corresponding angle in radians using:

(atan 300 1125) = 0.260602 radians

Alternatively:

(atan 0.266666667) = 0.260602 radians

Using the rtd function defined above, you can convert this to degrees:

(rtd (atan 300 1125)) = 14.9314 degrees

 

  • Thanks 2
Posted

Also look at angtos

 

(angtos 0.26 3)
"0.2600r"

(angtos 0.26 4)
"N 75d6'11\" E"

(angtos 0.26 1)
"14d53'49\""

 

  • Thanks 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...