@tscircuit/capacity-autorouter 0.0.84 → 0.0.85

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
@@ -11433,6 +11433,9 @@ peg$SyntaxError.buildMessage = function(expected, found) {
11433
11433
  var approximateCoordinate = (coord) => {
11434
11434
  return (Math.round(coord * 20) / 20).toFixed(2);
11435
11435
  };
11436
+ var approximateDeltaCoordinate = (coord) => {
11437
+ return (Math.round(coord * 1e3) / 1e3).toFixed(3);
11438
+ };
11436
11439
  setupGlobalCaches();
11437
11440
  var CachedUnravelSectionSolver = class extends UnravelSectionSolver {
11438
11441
  cacheHit = false;
@@ -11696,7 +11699,7 @@ var CachedUnravelSectionSolver = class extends UnravelSectionSolver {
11696
11699
  let hasDelta = false;
11697
11700
  if (modifiedPoint.x !== void 0) {
11698
11701
  const dx = modifiedPoint.x - originalSegmentPoint.x;
11699
- const approxDx = approximateCoordinate(dx);
11702
+ const approxDx = approximateDeltaCoordinate(dx);
11700
11703
  if (parseFloat(approxDx) !== 0) {
11701
11704
  normDelta.dx = approxDx;
11702
11705
  hasDelta = true;
@@ -11704,7 +11707,7 @@ var CachedUnravelSectionSolver = class extends UnravelSectionSolver {
11704
11707
  }
11705
11708
  if (modifiedPoint.y !== void 0) {
11706
11709
  const dy = modifiedPoint.y - originalSegmentPoint.y;
11707
- const approxDy = approximateCoordinate(dy);
11710
+ const approxDy = approximateDeltaCoordinate(dy);
11708
11711
  if (parseFloat(approxDy) !== 0) {
11709
11712
  normDelta.dy = approxDy;
11710
11713
  hasDelta = true;