Liferay.Loader.define("commerce-dashboard-web$d3-format@1.3.2/src/formatRounded", ['module', 'exports', 'require'], function (module, exports, require) {
    var define = undefined;
    var global = window;
    {
        import formatDecimal from "./formatDecimal";

        export default function (x, p) {
            var d = formatDecimal(x, p);
            if (!d) return x + "";
            var coefficient = d[0],
                exponent = d[1];
            return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join("0");
        }
    }
});
//# sourceMappingURL=formatRounded.js.map