Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
MikiraSora committed Sep 24, 2024
1 parent 0155ba8 commit d47caeb
Showing 1 changed file with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,6 @@ bool tryExchange(int li, int ri)
{
leftIdx++;
rightIdx++;

continue;
}

Expand All @@ -580,11 +579,6 @@ bool tryExchange(int li, int ri)
leftPoints.Insert(leftIdx, intersectionPoint);
rightPoints.Insert(rightIdx, intersectionPoint);
}

leftIdx++;
rightIdx++;

continue;
}
else
{
Expand Down Expand Up @@ -640,8 +634,10 @@ bool tryExchange(int li, int ri)
var centerPoint = new Vector2(centerX, intersectionPoint.Y);

//两边再插入中点
leftPoints.Insert(leftIdx, centerPoint);
rightPoints.Insert(rightIdx, centerPoint);
if (leftPoints[leftIdx] != centerPoint)
leftPoints.Insert(leftIdx, centerPoint);
if (rightPoints[rightIdx] != centerPoint)
rightPoints.Insert(rightIdx, centerPoint);
}
else
{
Expand Down Expand Up @@ -687,9 +683,6 @@ bool tryExchange(int li, int ri)
}

tryExchange(leftIdx, rightIdx);

leftIdx++;
rightIdx++;
}
#if DEBUG
circleDrawing.Begin(target);
Expand All @@ -709,7 +702,11 @@ bool tryExchange(int li, int ri)
out _
);
#endif
leftIdx++;
rightIdx++;
continue;
}

//看看哪一边idx需要递增
if (rightLine.from.Y <= leftLine.to.Y && leftLine.to.Y <= rightLine.to.Y)
{
Expand Down

0 comments on commit d47caeb

Please sign in to comment.