From the course: Learning AutoLISP & Visual LISP

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Function: angle

Function: angle

- [Narrator] The LISP function called angle, will return the angle in radians, between two points, the points of course being, a list of three numbers, the X, Y, and Z at each point. So let's go ahead and get our two points, and this point here, let's actually load the selection, instead of inspect. Our first point, our second point, so we have values now to each one of these variables. Now let's call now the LISP function Angle, and we provide it the two coordinates, and what is returned to that variable is the radian angle. Now that doesn't do us much good, especially if we want to write out to the user. Most of the time, we want to provide a number, or an angle that they're more familiar with. So let's go ahead and change how we're writing it out, and we're going to use a LISP function called ANGTOS, it's short for Angle-to-String, very similar to the Real-to-String, and we're going to simply provide it the angle in radians, and then change the units of the angle. So in this case…

Contents