🌐
W3Schools
w3schools.com › jsref › jsref_atan2.asp
JavaScript Math atan2() Method
The Math.atan2() method returns the arctangent of the quotient of its arguments, as a numeric value between PI and -PI radians.
🌐
TutorialsPoint
tutorialspoint.com › home › javascript › javascript math.atan2 function
JavaScript Math.atan2 Function
September 1, 2008 - The Math.atan2() method in JavaScript is used to calculate the arctangent of the quotient of its arguments, representing the angle in radians. It takes two parameters, y and x, and calculates the angle between the positive x-axis and the point ...
🌐
W3Schools
w3schools.sinsixx.com › jsref › jsref_atan.asp.htm
JavaScript atan() and atan2() Methods
Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building.
arctangent function with two arguments
atan2 - Wikipedia
atan2atan
{\textstyle \theta =\operatorname {atan2} (y,x)=\arctan \left(y/x\right).}
In computing and mathematics, the function atan2 is the 2-argument arctangent. By definition, ... {\displaystyle \operatorname {atan2} (y,x)} is the argument (also called phase or angle) of the complex number ... {\displaystyle … Wikipedia
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Math › atan2
Math.atan2() - JavaScript | MDN
December 29, 2025 - The Math.atan2() method measures the counterclockwise angle θ, in radians, between the positive x-axis and the point (x, y).
🌐
Programiz
programiz.com › javascript › library › math › atan2
JavaScript Math atan2()
// atan2() with positive infinity let num = Math.atan2(Infinity, 0); console.log(num); // atan2() with negative infinity let num = Math.atan2(-Infinity, 0); console.log(num); // atan2() with both infinities let num = Math.atan2(Infinity, -Infinity); console.log(num); // Output: // 1.5707963267948966 (π/2) // -1.5707963267948966 (-π/2) // 2.356194490192345 (3*π/4)
🌐
W3Schools
w3schools.com › python › ref_math_atan2.asp
Python math.atan2() Method
The math.atan2() method returns the arc tangent of y/x, in radians. Where x and y are the coordinates of a point (x,y). The returned value is between PI and -PI. ... If you want to use W3Schools services as an educational institution, team or ...
Find elsewhere
🌐
Vultr Docs
docs.vultr.com › javascript › standard-library › Math › atan2
JavaScript Math atan2() - Calculate Arctangent | Vultr Docs
November 28, 2024 - The JavaScript Math.atan2() function is essential for computing the angle in radians between the positive x-axis and the point given by the coordinates (x, y).
🌐
p5.js
p5js.org › reference › p5 › atan2
atan2
atan2() is most often used for orienting geometry to the mouse's position, as in atan2(mouseY, mouseX).
🌐
Can I Use
caniuse.com › mdn-javascript_builtins_math_atan2
JavaScript built-in: Math: atan2 | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › p5-js-atan2-function
p5.js atan2() Function - GeeksforGeeks
July 12, 2025 - The atan2() function in p5.js is used to calculate the angle from a specified point of origin measured from the positive x-axis. The values are returned in the range of PI to -PI as floating points.
🌐
Math.js
mathjs.org › docs › reference › functions › atan2.html
math.js | an extensive math library for JavaScript and Node.js
math.atan2(2, 2) / math.pi // returns number 0.25 const angle = math.unit(60, 'deg') const x = math.cos(angle) const y = math.sin(angle) math.atan2(y, x) * 180 / math.pi // returns 60 math.atan(2) // returns number 1.1071487177940904 · tan, atan, sin, cos ·
🌐
MDN
mdn2.netlify.app › en-us › docs › web › javascript › reference › global_objects › math › atan2
Math.atan2() - JavaScript | MDN
The Math.atan2() function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0,0) to the point (x,y), for Math.atan2(y,x).
🌐
HCL Software
help.hcl-software.com › dom_designer › 9.0.1 › reference › r_wpdr_standard_math_atan2_r.html
atan2 (JavaScript)
Math (JavaScript) atan2(y:double, x:double) : double · Special cases are as follows: The following yields NaN: y or x is NaN. The following yield +0: y is +0 and x is positive · y is positive and finite and x is +Infinity · The following yield -0: y is -0 and x is positive ·
🌐
Oracle
forums.oracle.com › ords › apexds › post › problem-using-atan2-function-2063
Problem using atan2 function - Oracle Forums
August 7, 2008 - Hi everyone, I'm developing an application that needs to calculate the angle between two vectors. While this is fairly simple, you just need to use the Math.atan2() function, i am having a few problem...
🌐
Edgecompute
js-compute-reference-docs.edgecompute.app › math.atan2()
Math.atan2() | @fastly/js-compute
The Math.atan2() function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0, 0) to the point (x, y), for Math.atan2(y, x).
🌐
Runoob
runoob.com › jsref › jsref-atan2.html
JavaScript atan2() 方法 | 菜鸟教程
JavaScript Math 对象 · ... 以上实例输出: 1.1071487177940904 · 尝试一下 » · atan2() 返回从原点(0,0) 到 (x,y) 点的线段与 x 轴正方向之间的平面角度(弧度值),也就是 Math.atan2(y,x)。 ·...