View difference between Paste ID: 5uNfRZZ2 and Bw4mXPxy
SHOW: | | - or go back to the newest paste.
1
static void Circle2DGI( float x, float y, out float distance, out float angle ) {
2-
  float inverseDistance;
2+
3
  y *= 1.0f / distance;
4-
  inverseDistance = 1.0f / distance;
4+
5-
  x *= inverseDistance;
5+
    angle = ( float )Math.Acos( y ) * 180.0f / ( float )Math.PI;
6-
  y *= inverseDistance;
6+
7
    angle = 180.0f + ( float )Math.Acos( -y ) * 180.0f / ( float )Math.PI;
8-
    angle = ( float )Math.Acos( y ) * 180.0f / ( float )Math.PI 
8+
9
}