title: Coordinates for my Javascript game - based on an angle, when do I use Sin Cos and Tan?
body: <p>JavaScript coordinates Sin, Cos or Tan?
  I am trying to learn some basic trigonometry for game development in the web browser. I know the soh cah toa rule etc. I know we are also working between -1 and 1.</p>
  
  <p>I am confused though, I need to work out x and y coordinates separately depending on an angle.</p>
  
  <p>Here is what I have to work out the direction of my angle in x and y, which does work (Thanks to Loktar).</p>
  
  <pre><code>velY = -Math.cos(angle * Math.PI / 180) * thrust;
  velX = Math.sin(angle * Math.PI / 180) * thrust;
  </code></pre>
  
  <p>What I understand from this is I am finding the cos of x and y based on a small formula to convert my angle variable to radians.</p>
  
  <p>But, why does cos need to be used for x and sin for y? Where does tan come into this? Is this to do with the 4 quadrants of a circle?</p>
  
  <p>How do I know when to use sin cos or tan when I am only given an angle and I need to work out where on a circle that angle places using x,y?</p>
  
  <p>Any simple diagrams or explanations would be extremely helpful!</p>
  
  <p>Thanks</p>