title: Find angle of point on circle
body: <p>Imagine I have drawn a circle with center coordinates (cx,cy) on the screen and a random point (A) is selected on the circle.</p>
  
  <p><a href="https://i.stack.imgur.com/2O2Gs.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2O2Gs.png" alt="trigonometric circle"></a></p>
  
  <p>By having the the coordinates of point A, I need to find the angle of (a).</p>
  
  <p>Update:</p>
  
  <p>I have tried using the following formula:</p>
  
  <pre><code>Math.toDegrees(Math.asin(((x - cx) / radius).toDouble()))
  </code></pre>
  
  <p>which is actually the reverse of (the circle is created by feeding angles to this one):</p>
  
  <pre><code>x = radius * Math.sin(Math.toRadians(angle.toDouble())) + cx
  y = radius * Math.cos(Math.toRadians(angle.toDouble())) + cy
  </code></pre>
  
  <p>But since the y coordinate is not present in the formula the answer could be wrong.</p>