round
Script
v3
Fork
1
2
3
4
/** round with abitrary decimal precision */
export
function
round
(
number
:
number
,
precision
=
5
)
{
return
Math
.
round
(
number
*
Math
.
pow
(
10
,
precision
)
)
/
Math
.
pow
(
10
,
precision
)
;
}