title: JavaScript trigonometric
body: <p>I'm working on some JavaScript and I've run across a problem with the math:</p>
  
  <pre><code>var p1 = {x:0,y:0}, p2 = {x:1,y:1};
  return Math.sin(45) * Math.sqrt((Math.pow(p2.x-p1.x,2) + Math.pow(p2.y-p1.y,2)));
  </code></pre>
  
  <p>Returns 1.203359304667218</p>
  
  <p>But when I do the same calculation on my calculator, it returns 1 which is what I expect this calculation to return. Can anyone explain this?</p>