UNPKG
phpjs
Version:
latest (1.3.2)
1.3.2
1.2.2
1.1.2
1.0.2
1.0.1
1.0.0
0.0.1
php.js offers community built php functions in javascript
phpjs.org
kvz/phpjs
phpjs
/
functions
/
math
/
atan2.js
8 lines
(7 loc)
•
226 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
function
atan2
(
y
,
x
) {
//
discuss at: http:
//p
hpjs.org/functions/
atan2
/
//
original by: Brett Zamir (http:
//
brett-zamir.me) // example
1
:
atan2
(
1
,
1
);
//
returns
1
:
0.7853981633974483
return
Math.atan2(
y
,
x
); }