UNPKG
php.js
Version:
latest (0.1.1)
0.1.1
0.1.0
Use phpjs functions as required.
php.js
/
atan2.js
10 lines
(8 loc)
•
295 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
module
.
exports
=
function
(
){
return
atan2.
apply
(
exports
,
arguments
) };
function
atan2
(
y, x
) {
// discuss at: http://phpjs.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); }