SHARE
TWEET

Untitled

a guest Dec 11th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private static double GetAngle(Point point, Point laser)
  2.         {
  3.             var r = Math.Atan2( -point.Y + laser.Y, -point.X + laser.X)*(180/Math.PI);
  4.             if (r < 0)
  5.             {
  6.                 r = 360 + r;
  7.             }
  8.  
  9.             r -= 90;
  10.             if (r < 0)
  11.             {
  12.                 r += 360;
  13.             }
  14.             return r;
  15.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top