title: Get X,Y coordinates from Angle & Distance ( Incorrect values using Math.cos() & Math.sin() )
body: <p>I've read all accepted answers on this topic and repeated exactly the logic used in them but my results seem to be skewed and 'random'.</p>
  
  <p>I have correctly collected the X,Y and degrees from the center object as shown here:</p>
  
  <pre><code>console.log('deg' + degrees + ' - ' + 'x' + parseInt(x) + ', y' + parseInt(y));
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/oGSQe.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oGSQe.gif" alt="enter image description here"></a>
  <strong>Note:</strong> The X,Y grid spans much further out of the viewport that is shown. Technically the grid is unlimited in size. We are in our own specific X,Y coordinate in this grid space.</p>
  
  <p>Now I want to calculate an X,Y coordinate that is 1000 pixels away from the click position. Here is an example of what I'm trying to achieve:</p>
  
  <p><a href="https://i.stack.imgur.com/HXQAc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HXQAc.png" alt="enter image description here"></a></p>
  
  <p>The logic I found elsewhere should be as simple as such:</p>
  
  <pre><code>x = 1000 * Math.cos(degrees);
  y = 1000 * Math.sin(degrees);
  console.log('deg' + degrees + ' - ' + 'x' + parseInt(x) + ', y' + parseInt(y));
  </code></pre>
  
  <p>The result is as such:</p>
  
  <p><a href="https://i.stack.imgur.com/Zn6mb.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zn6mb.gif" alt="enter image description here"></a></p>
  
  <p><strong>The issue:</strong> Clearly in the image above, the X,Y coordinates are way off to what I should be expecting. They are much too low and change too often to random numbers.</p>
  
  <p>The grid for this layout is as shown below:</p>
  
  <p><a href="https://i.stack.imgur.com/IADKs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IADKs.png" alt="enter image description here"></a></p>
  
  <p><strong>Note:</strong> The X axis goes positive to the left. Is this the underlying issue or is it my original logic that is wrong?</p>
  
  <p>Thank you for considering my question</p>
  
  <hr>
  
  <p>I've tried the suggested code. Here are my results.</p>
  
  <p>Result from @MBo's <em>now old</em> answer:</p>
  
  <pre><code>new_x = 1000 * Math.cos(degrees * Math.PI / 180);
  new_y = 1000 * Math.sin(degrees * Math.PI / 180);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/3AoMu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3AoMu.png" alt="enter image description here"></a></p>
  
  <p>The results look a lot cleaner and less 'random' however the end X,Y go in the incorrect direction and distance</p>