5 lines
182 B
JavaScript
5 lines
182 B
JavaScript
// 为了解决 js 运算的精度问题
|
|
export function prettyNumber(n) {
|
|
return Math.abs(n) < 1e-15 ? n : parseFloat(n.toFixed(15));
|
|
}
|
|
//# sourceMappingURL=pretty-number.js.map
|