UNPKG

@antv/scale

Version:

Toolkit for mapping abstract data into visual representation.

5 lines (4 loc) 147 B
// 为了解决 js 运算的精度问题 export function prettyNumber(n: number) { return Math.abs(n) < 1e-14 ? n : parseFloat(n.toFixed(14)); }