2.0.2 • Published 3 years ago
node-compute v2.0.2
node-compute
Description
node项目中用于解决计算浮点的问题
Installation
yarn add node-compute
Instructions
import { isNum, add, subtract, multiply, divide, round, precision } from 'node-compute'
isNum 是否为数字
isNum(3) // true
add 加法函数
add(1, 2, 3) // 6
subtract 减法函数
subtract(9, 3, 2) // 4
multiply 乘法函数
multiply(3, 4, 5) // 60
divide 除法函数
divide(12, 2, 3) // 2
round 精度计算(四舍五入)
round(1.78236478, 4) // 1.7824
precision 精度计算(非四舍五入)
precision(1.78236478, 4) // 1.7823
Contribution
- Fork the repository
- Create Feat_xxx branch
- Commit your code
- Create Pull Request
Gitee Feature
- You can use Readme_XXX.md to support different languages, such as Readme_en.md, Readme_zh.md
- Gitee blog blog.gitee.com
- Explore open source project https://gitee.com/explore
- The most valuable open source project GVP
- The manual of Gitee https://gitee.com/help
- The most popular members https://gitee.com/gitee-stars/