Math.sin() value of any radian number

We can use Math.max() JavaScript math function to get highest value from a set of numbers. Here is the syntax
 Math.sin(angle)
angle is in Radian
<script language='JavaScript' type='text/JavaScript'>
<!--
document.write(Math.PI); // Output is 3.141592653589793
document.write("<br>");
document.write(Math.sin(0)); // Output is 0
document.write("<br>");
document.write(Math.sin(90)); // Output is 0.8939966636005579
document.write("<br>");
document.write(Math.sin(Math.PI)); // Output is 1.2246467991473532e-16
document.write("<br>");
document.write(Math.sin( Math.PI/2 )); // Output is 1
document.write("<br>");
document.write(Math.sin( 3 * Math.PI/2 )); // Output is -1
document.write("<br>");
document.write(Math.sin( 2 * Math.PI )); // Output is -2.4492935982947064e-16
//-->
</script>

Math.sin() using angles in degree

To get Radian value of any angle in degree
(Math.PI/180 ) * angle_in_degree
Here we have used different values of angle in degree.
<script language='JavaScript' type='text/JavaScript'>
<!--
document.write(Math.sin(( Math.PI/180 ) * 90)); // Output is 1
document.write("<br>");
document.write(Math.sin(( Math.PI/180 ) * 180)); // Output is 1.2246467991473532e-16
document.write("<br>");
document.write(Math.sin(( Math.PI/180 ) * 270)); // Output is -1
document.write("<br>");
document.write(Math.sin(( Math.PI/180 ) * 360)); // Output is -2.4492935982947064e-16
//-->
</script>
Absolute value of integer
JavaScript Math Reference
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com







    Post your comments , suggestion , error , requirements etc here




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer