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.
<!DOCTYPE html>
<html>
<body>
<p id="demo">Click the button calculate value of 90 degrees.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction(){
document.getElementById("demo").innerHTML=Math.sin(90);
}
</script>