js-big-decimal
Advanced tools
Comparing version 1.3.14 to 1.3.15
{ | ||
"name": "js-big-decimal", | ||
"version": "1.3.14", | ||
"version": "1.3.15", | ||
"description": "Work with large numbers on the client side. Round them off to any required precission.", | ||
@@ -5,0 +5,0 @@ "main": "dist/node/js-big-decimal", |
@@ -24,2 +24,3 @@ # JS Big Decimal | ||
- [Contributors Welcome!](#contributors-welcome) | ||
- [Installation](#installation) | ||
@@ -32,2 +33,3 @@ - [Usage](#usage) | ||
- [round(number, precision, roundingMode)](#roundnumber-precision-roundingmode) | ||
- [abs(number)](#absnumber) | ||
- [floor(number)](#floornumber) | ||
@@ -148,2 +150,14 @@ - [ceil(number)](#ceilnumber) | ||
### abs(number) | ||
Returns the absolute value of a number. | ||
```javascript | ||
var n1 = bigDecimal.abs(12.8) // "12.8" | ||
var n2 = bigDecimal.abs(-12.3) // "12.3" | ||
``` | ||
The instance returns the result as new `bigDecimal` | ||
```javascript | ||
var n1 = new bigDecimal(12.8).abs() // bigDecimal(12.8) | ||
var n2 = new bigDecimal(-12.3).abs() // bigDecimal(-12.3) | ||
``` | ||
### floor(number) | ||
@@ -150,0 +164,0 @@ Returns the whole number nearest but not greater than the input number. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
109802
278