summaryrefslogtreecommitdiff
path: root/lib/stitches/running_stitch.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-05-29 19:58:27 -0400
committerGitHub <noreply@github.com>2018-05-29 19:58:27 -0400
commitd3d5e45fa59893825927a50e0bfcaba22d7bb196 (patch)
treeed970267c2a09ba56256c0b4c3aafa5bacabb049 /lib/stitches/running_stitch.py
parentbf86eace9ada3beb6ba58f6f3d982da0e391bd7c (diff)
parentb32a37178aaa1a31beb608d69504e6b4a822a1b5 (diff)
Merge pull request #171 from lexelby/lexelby-fix-grandma
fix grandma
Diffstat (limited to 'lib/stitches/running_stitch.py')
-rw-r--r--lib/stitches/running_stitch.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/stitches/running_stitch.py b/lib/stitches/running_stitch.py
index 81124339..96075e7a 100644
--- a/lib/stitches/running_stitch.py
+++ b/lib/stitches/running_stitch.py
@@ -16,7 +16,7 @@ def running_stitch(points, stitch_length):
if len(points) < 2:
return []
- output = [points[0]]
+ output = []
segment_start = points[0]
last_segment_direction = None
@@ -59,8 +59,8 @@ def running_stitch(points, stitch_length):
last_segment_direction = segment_direction
distance -= segment_length
- # stitch the last point unless we're already almos there
- if (segment_start - points[-1]).length() > 0.1:
+ # stitch the last point unless we're already almost there
+ if (segment_start - output[-1]).length() > 0.1:
output.append(segment_start)
return output