August 1999
Intermediate to advanced
1488 pages
72h 53m
English
math.acos(num)
The acos() method of the Math object is used to calculate the arccosine of a number. The return value is between 0 and PI and is measured in radians. If the return value is outside this range, 0 is returned.
Listing 6.152 shows how the acos() method is used and what values can be returned.
<html> <body> <script language="JavaScript"> <!–– Hide // function calculates the arccosine of the input number function doMath(){ var inputNum=document.form1.input.value; var result = Math.acos(inputNum); document.form1.answer.value = result; } // End Hide ––> </script> <form ... |
Read now
Unlock full access