Math.asin() : asin : Math JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Math » asin »

 

Math.asin()











Syntax








math.asin(num)



The asin() method calculates and returns the arcsine of a number.

The return value is -PI/2 and PI/2 in radians.

If the return value is not within this range, 0 is returned.












<html>
    <body>
    <script language="JavaScript">
    <!--
    function doMath(){
        var inputNum=document.form1.input.value;
        var result = Math.asin(inputNum);
        document.form1.answer.value = result;
    }
    -->
    </script>
    <form name=form1>
    This example calculates the arcsine of the entered number.
    <br><br>
    Enter Number:
    <input type="text" name="input" size=10>
    <input type="button" value="Calculate" onClick='doMath()'>
    <br>
    The arcsin is:
    <input type="text" name="answer" size=10>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Math
» asin