
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Math.atan() function JavaScript
The atan() function of the Math object accepts a number and returns its arctangent value in radians. To convert the resultant value into degrees, multiply it with 180 and divide the result by 3.14159 (pi value).
Syntax
Its Syntax is as follows
Math.atan(0.5)
Example
<html> <head> <title>JavaScript Example</title> </head> <body> <script type="text/javascript"> var result = Math.atan(0.5); document.write("arctangent value: "+result); document.write("<br>"); document.write("arctangent value in degrees: "+result*180/Math.PI); </script> </body> </html>
Output
arctangent value: 0.4636476090008061 arctangent value in degrees: 26.56505117707799
- Related Questions & Answers
- Math.Atan() Method in C#
- Date.getTime() function JavaScript
- Math.min() function JavaScript
- JavaScript Sleep() function?
- JavaScript array.includes() function
- JavaScript Array.of() function
- JavaScript Array.prototype.map() function
- JavaScript toLocaleString() function
- JavaScript array.toLocaleString() function
- JavaScript Symbol.for() function
- JavaScript Function Apply
- JavaScript Function Call
- JavaScript Function Definitions
- JavaScript Function Invocation
- JavaScript Function Parameters
Advertisements