title: How do i use Math.sin() in javascript to get correct answer?
body: <p>When I use Math.sin(90) for calculating Sine of 90 degrees in javascript it returns 0.8939966636005565, but sin(90) is 1. Is there a way to fix that? I need accurate values for any angle.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
      &lt;p id="demo"&gt;Click the button calculate value of 90 degrees.&lt;/p&gt;
      &lt;button onclick="myFunction()"&gt;Try it&lt;/button&gt;
  &lt;script&gt;
  function myFunction(){
      document.getElementById("demo").innerHTML=Math.sin(90);
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>
  </p>