round:将值四舍五入到小数位数

时间:2021-03-13 23:10:45
【文件属性】:
文件名称:round:将值四舍五入到小数位数
文件大小:107KB
文件格式:ZIP
更新时间:2021-03-13 23:10:45
math floating-point float round JavaScript 圆形的 将值四舍五入到小数位数,避免了JavaScript的浮点怪异。 安装 npm install @alvarocastro/round 用法 const round = require ( '@alvarocastro/round' ) ; round ( 1.005 ) ; // => 1.01 round ( 2.2222 , 1 ) ; // => 1.1 round ( 3 , 5 ) ; // => 3 舍入(数字[,小数= 2]) 返回四舍五入到给定小数位数的值。 数字 类型: Number 取舍价值。 小数点 类型: Number 默认值:2 将数字四舍五入的小数位数。 贡献 永远欢迎捐款! 请事先运行npm test以确保一切正常。 支持 如果您使用此软件包,请考虑为其加注星标:)
【文件预览】:
round-master
----index.js(498B)
----test.js(1KB)
----package.json(705B)
----.github()
--------dependabot.yml(104B)
--------workflows()
----LICENSE(1KB)
----package-lock.json(439KB)
----.gitignore(2KB)
----README.md(2KB)

网友评论