Skip to content

Commit b4a44b2

Browse files
author
shinuza
committed
Added toNumber()
1 parent 9e9ca1e commit b4a44b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/decimal.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
this.toString = function() {
5757
return this.internal;
5858
};
59+
60+
this.toNumber = function() {
61+
return Number(this.internal);
62+
}
5963
};
6064

6165
var as_integer = function(number) {

0 commit comments

Comments
 (0)