title: Find the point on a circle with given center point, radius, and degree
body: <p>It's been 10 years since I did any math like this... I am programming a game in 2D and moving a player around. As I move the player around I am trying to calculate the point on a circle 200 pixels away from the player position given a positive OR negative angle(degree) between -360 to 360. The screen is 1280x720 with 0,0 being the center point of the screen. The player moves around this entire Cartesian coordinate system. The point I am trying trying to find can be off screen. </p>
  
  <p>I tried the formulas on article <a href="https://stackoverflow.com/questions/2887513/find-the-point-with-radius-and-angle?rq=1">Find the point with radius and angle</a> but I don't believe I am understanding what "Angle" is because I am getting weird results when I pass Angle as -360 to 360 into a Cos(angle) or Sin(angle).</p>
  
  <p><strong>So for example I have...</strong></p>
  
  <ul>
  <li>1280x720 on a Cartesian plane </li>
  <li>Center Point (the position of player):
  
  <ul>
  <li>let x = a number between minimum -640 to maximum 640</li>
  <li>let y = a number between minimum -360 to maximum 360 </li>
  </ul></li>
  <li>Radius of Circle around the player: let r always = 200  </li>
  <li>Angle: let a = a number given between -360 to 360 (allow negative to point downward or positive to point upward so -10 and 350 would give same answer)</li>
  </ul>
  
  <p><strong>What is the formula to return X on the circle?</strong></p>
  
  <p><strong>What is the formula to return Y on the circle?</strong></p>
  
  <p><img src="https://i.stack.imgur.com/OxJkt.gif" alt="enter image description here">
  <img src="https://i.stack.imgur.com/nxQrA.png" alt="enter image description here"></p>