@danxbot/ui 20.4.0 → 20.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -31544,7 +31544,12 @@ function jB(e, t) {
31544
31544
  const a = i >= 1 - UB && s.length > 1;
31545
31545
  return { arcs: s.map((l, d) => d < s.length - 1 || a ? { ...l, length: Math.max(0, l.length - HB) } : l), used: n, overflow: r };
31546
31546
  }
31547
- const ec = (e, t) => t > 0 ? Math.round(e / t * 100) : 0;
31547
+ const ec = (e, t) => (
31548
+ // `part * 100` before the divide: `29 / 100 * 100` is 28.999999999999996 and
31549
+ // would floor to 28. Exact for whole-number inputs, and a part equal to the
31550
+ // total is exactly 100.
31551
+ t > 0 ? Math.floor(e * 100 / t) : 0
31552
+ );
31548
31553
  function GB(e) {
31549
31554
  return e.segments === void 0 ? /* @__PURE__ */ u(WB, { ...e }) : /* @__PURE__ */ u(KB, { ...e });
31550
31555
  }