site/node_modules/d3-format/src/precisionRound.js
2024-10-14 08:09:33 +02:00

6 lines
189 B
JavaScript

import exponent from "./exponent.js";
export default function(step, max) {
step = Math.abs(step), max = Math.abs(max) - step;
return Math.max(0, exponent(max) - exponent(step)) + 1;
}