JavaScript/Number
来自康健生活
引言
在内部被表示为 64 位的浮点数。且没有分离整数类型。 模板:Leftrightflex
整数
浮点数
指数
四舍五入
Math.round
toFixed
舍入规则 Number.prototype.toFixed ( fractionDigits )[1]。 模板:Leftrightflex
自定义
库
| kind-of | is-number | big.js |
| bignumber.js | decimal.js | 示例 |
| 示例 | 示例 | 示例 |
- ↑ Ecma International.ECMAScript® 2015 Language Specification:Number.prototype.toFixed ( fractionDigits )[S]:2015
No categories