title: iOS: derive angle of tap point given a circle
body: <p>I have got a UIImageView displaying a circle divided in six equal triangles corresponding to:</p>
  
  <ul>
  <li>area1 between 0-60 degrees</li>
  <li>area2 between>60-120 degrees</li>
  <li>area3 between>120-180 degrees</li>
  <li>area4 between>180-240 degrees</li>
  <li>area5 between>240-300 degrees</li>
  <li>area6 between>300-360 degrees</li>
  </ul>
  
  <p>The circle is similar to the following (pardon me for the bad drawing):</p>
  
  <p><img src="https://i.stack.imgur.com/RKZr1.png" alt="enter image description here"></p>
  
  <p>I would like to derive from the touch point in which area the tap is. For example if the user taps at the top right corner of the circle then the area should be area 2: ">60-120".</p>
  
  <p>The input data I got is:</p>
  
  <ul>
  <li>width and height of the frame containing the circle (e.g. 200 pixel wide, 200 pixels height)</li>
  <li>tap point coordinates</li>
  </ul>
  
  <p>Any suggestion on how to infer in which area the tap point falls given the input data described above?</p>