< Back to IRCAM Forum

Arctan

I have a point with coordinates (x,y) and I would like to calculate its angle w.r.t. the origin.

  • Assuming it is in the first quadrant (x,y>0), one can calculate the angle as arctan(y/x).
  • More generally, one typically uses the atan2 function, that automatically returns the angle in the right quadrant depending on the signs of the x and y coordinates.

However, nor the arctan nor the atan2 functions are implemented in OM.

Would they be included in a library? Or should one implement them in LISP?

1 Like

Well, there is a LISP atan function that takes a second argument :slight_smile:
http://www.lispworks.com/documentation/HyperSpec/Body/f_asin_.htm

1 Like