title: Math.Cos & Math.Sin in C#
body: <p>I'm trying something that I thought should be reasonably simple.  I have an angle, a position and a distance and I want to find the X,Y co-ordinates from this information.</p>
  
  <p>With an example input of 90 degrees I convert the value to radians with the following code:</p>
  
  <pre><code>public double DegreeToRadian(float angle)
  {
    return Math.PI * angle / 180.0;
  }
  </code></pre>
  
  <p>This gives me 1.5707963267949 radians
  Then when I use</p>
  
  <pre><code>Math.Cos(radians)
  </code></pre>
  
  <p>I end up with an an answer of: 6.12303176911189E-17</p>
  
  <p>What the heck is going on?  The cosine of 90 degrees should be 0, so why am I getting such a deviance... and more importantly how can I stop it?</p>