August 1999
Intermediate to advanced
1488 pages
72h 53m
English
math.atan(num)
The atan() method of the Math object is used to calculate the arctangent of a number. The return value is a numeric value between –PI/2 and PI/2 radians.
Listing 6.154 shows how the atan() method is used to calculate the arctangent of a number.
<html> <body> <script language="JavaScript"> <!–– Hide // function calculates the arctangent of the input number function doMath(){ var inputNum=document.form1.input.value; var result = Math.atan(inputNum); document.form1.answer.value = result; } // End Hide ––> </script> <form name=form1> This example calculates the arctangent ... |
Read now
Unlock full access