Skip to content

Commit c385924

Browse files
committed
sortfix
1 parent b6b7462 commit c385924

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gcodeplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ def inside(z, path):
199199
xIntercept = p2.real - reciprocalSlope * p2.imag
200200
if xIntercept == 0:
201201
return False # on boundary
202-
if xIntercept > 0:
203-
if p1.imag < p2.imag:
202+
if p1.imag * p2.imag < 0 and xIntercept > 0:
203+
if p1.imag < 0:
204204
s += 1
205205
else:
206206
s -= 1

0 commit comments

Comments
 (0)