FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
bitcore/Number.monkey.js at master · truevector1/bitcore · GitHub
truevector1
bitcore
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
bitcore
/
Number.monkey.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
8 lines (8 loc) · 246 Bytes
Breadcrumbs
bitcore
/
Number.monkey.js
Copy path
File metadata and controls
8 lines (8 loc) · 246 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
exports
.
patch
=
function
(
Number
)
{
//round to specified number of places
Number
.
prototype
.
round
=
function
(
places
)
{
if
(
!
places
)
return
Math
.
round
(
this
)
;
var
tmp
=
Math
.
pow
(
10
,
places
)
;
return
Math
.
round
(
this
*
tmp
)
/
tmp
;
}
;
}
;
Back
|
FazBrowse Home
|
New Git URL