非常好用的number-precision,成功解决js计算时丢

2021-11-03  本文已影响0人  goodTime_luo7

安装

npm install number-precision --save

使用

import NP from 'number-precision';

方法

NP.plus(num1, num2, num3, ...)   // addition, num + num2 + num3, two numbers is required at least.
NP.minus(num1, num2, num3, ...)  // subtraction, num1 - num2 - num3
NP.times(num1, num2, num3, ...)  // multiplication, num1 * num2 * num3
NP.divide(num1, num2, num3, ...) // division, num1 / num2 / num3

想知道更多可以查看文档https://developer.aliyun.com/mirror/npm/package/number-precision

上一篇下一篇

猜你喜欢

热点阅读