title: How to get angle of point from center point?
body: <p>If I have 2 points (x0,y0) which is the center of the circle, and another point (x,y) (this is the red dot on the circle boundary in the image). How can I get the angle of the dot?</p>
  
  <p>Note, it should return an angle in degrees, from [0,360). The red dot angle in the image is approximately 70 degrees.</p>
  
  <p>How can I do this in python?</p>
  
  <p>Thanks</p>
  
  <p>This doesn't seem to work.</p>
  
  <pre><code>        (dx, dy) = (x0-x, y-y0)
          angle = atan(float(dy)/float(dx))
          if angle &lt; 0:
              angle += 180
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/x4giX.png" alt="enter image description here"></p>