UNPKG

adaptive-expressions

Version:
46 lines (42 loc) 1.74 kB
var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // node_modules/d3-format/src/precisionRound.js var precisionRound_exports = {}; __export(precisionRound_exports, { default: () => precisionRound_default }); module.exports = __toCommonJS(precisionRound_exports); // node_modules/d3-format/src/formatDecimal.js function formatDecimalParts(x, p) { if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; var i, coefficient = x.slice(0, i); return [ coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1) ]; } // node_modules/d3-format/src/exponent.js function exponent_default(x) { return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN; } // node_modules/d3-format/src/precisionRound.js function precisionRound_default(step, max) { step = Math.abs(step), max = Math.abs(max) - step; return Math.max(0, exponent_default(max) - exponent_default(step)) + 1; } //# sourceMappingURL=precisionRound.js.map