bigjs-adapter
Advanced tools
Comparing version 2.2.1 to 2.3.0
{ | ||
"name": "bigjs-adapter", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "big.js adapter for linear-arbitrary-precision", | ||
@@ -5,0 +5,0 @@ "main": "src/bigjs-adapter.js", |
@@ -17,2 +17,3 @@ /*jshint node:true */ | ||
pow: pow, | ||
sqrt: sqrt, | ||
equals: equals, | ||
@@ -52,2 +53,6 @@ toString: toString, | ||
function sqrt(x) { | ||
return x.sqrt(); | ||
} | ||
function equals(x, y) { | ||
@@ -54,0 +59,0 @@ return x.eq(y); |
@@ -57,3 +57,7 @@ /*jshint node:true, mocha:true */ | ||
it('should have a pow method with support for ints only', function() { | ||
it('should have an sqrt method', function() { | ||
new Decimal('9').sqrt().valueOf().should.be.exactly('3'); | ||
}); | ||
it('should have an equals method', function() { | ||
new Decimal('2').equals(new Decimal('2')).should.be.exactly(true); | ||
@@ -60,0 +64,0 @@ new Decimal('2').equals(new Decimal('3')).should.be.exactly(false); |
8261
140