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
/
numbers
/
goldenRatio.js
6 lines
(5 loc)
•
154 B
JavaScript
View Raw
1
2
3
4
5
6
get
goldenRatio
()
{
const
n =
15
const
BN = BigNumber.clone({ DECIMAL_PLACES: n +
1
})
return
new
BN(BN(
1
).plus(
this
.sqrt(
5
)).div(
2
).toFixed(n +
1
)) }