safe-math-ops 0.0.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,4 +13,8 @@ console.log(safeMath.substract([9.99, 8]));
|
|
|
13
13
|
|
|
14
14
|
// Expected output: 1.9900000000000002
|
|
15
15
|
console.log(9.99 - 8);
|
|
16
|
+
|
|
17
|
+
// Alternatively, you can use that fixed precision point function that prevent weird decimals from appearing too.
|
|
18
|
+
// Expected output: 1.99
|
|
19
|
+
console.log(safeMath.format(9.99 - 8));
|
|
16
20
|
```
|