Skip to content

Commit 76ec037

Browse files
committed
Fix bug in flatness calculation
1 parent aa938d2 commit 76ec037

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎py2d/Bezier.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,4 @@ def __is_flat(max_divisions, max_flatness, flatness):
115115
return (max_divisions == 0) or (max_flatness != None and flatness <= max_flatness)
116116

117117
def __bezier_flatness(p1,p2, *c):
118-
return min(distance_point_line(cp, p1, p2) for cp in c)
118+
return max(distance_point_line(cp, p1, p2) for cp in c)

0 commit comments

Comments
 (0)