UNPKG
theorem.js
Version:
latest (1.2.0)
1.2.0
1.1.0
1.0.1
1.0.0
0.1.0
0.0.2
0.0.1
A Math library for computation in JavaScript
github.com/arguiot/TheoremJS
arguiot/TheoremJS
theorem.js
/
src
/
includes
/
functions
/
math
/
trig
/
atan2.js
10 lines
(9 loc)
•
231 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
atan2
(
x, y
) { x = [
BigNumber
(x).
toNumber
()] y = [
BigNumber
(y).
toNumber
()]
let
result = []
for
(
var
i =
0
; i < x.
length
; i++) { result.
push
(
Math
.
atan2
(x[i], y[i])) }
return
result.
length
==
1
? result[
0
] : result }