JavaScript Math atan() methodThe JavaScript math atan() method returns the arctangent of the given number in the form of radians. The value returned by atan() method lies between -Math.PI/2 to Math.PI/2. SyntaxThe atan() method is represented by the following syntax: Parameternum - A number. ReturnThe arctangent of the number. JavaScript Math atan() method exampleHere, we will understand atan() method through various examples. Example 1Let's see a simple example of atan() method. Test it NowOutput: -0.7853981633974483 0 0.4636476090008061 0.7853981633974483 Example 2Let's see an example of atan() method that contains infinity as an argument. Test it NowOutput: 1.5707963267948966 -1.5707963267948966 Example 3Here, you can test atan() method with your own test cases. Test it Now
Next TopicJavaScript Math
|
Javatpoint provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India