Skip to content

Commit ffaacf3

Browse files
committed
Improving path sticher
1 parent 433a3e9 commit ffaacf3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

PolygonMesh/Csg/PathStitcher.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
Copyright (c) 2021, Lars Brubaker
33
All rights reserved.
44
@@ -191,11 +191,11 @@ public static int GetPolygonToAdvance(Polygon outerLoop, int outerIndex, Polygon
191191
{
192192
// given the start, find the closest next point along either polygon to move to
193193
var outerStart = outerLoop[outerIndex];
194-
var outerNextIndex = outerIndex + 1 % outerLoop.Count;
194+
var outerNextIndex = (outerIndex + 1) % outerLoop.Count;
195195
var outerNext = outerLoop[outerNextIndex];
196196

197197
var innerStart = innerLoop[innerIndex];
198-
var innerNextIndex = innerIndex + 1 % innerLoop.Count;
198+
var innerNextIndex = (innerIndex + 1) % innerLoop.Count;
199199
var innerNext = innerLoop[innerNextIndex];
200200

201201
var distanceToInnerNext = (innerNext - outerStart).LengthSquared();

0 commit comments

Comments
 (0)