From 4214e5b999aff86e2d1dab01eebdbea8d9c01564 Mon Sep 17 00:00:00 2001 From: CocoHecmatial Date: Tue, 29 Oct 2019 16:49:00 +0800 Subject: [PATCH] =?UTF-8?q?line2=E7=96=91=E4=BC=BC=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pygorithm/geometry/line2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygorithm/geometry/line2.py b/pygorithm/geometry/line2.py index bf8103d..3ed4d69 100644 --- a/pygorithm/geometry/line2.py +++ b/pygorithm/geometry/line2.py @@ -561,7 +561,7 @@ def unshift_vec(vec): l1_min = min(l1_st_y, l1_en_y) if offset1 is not None else line1.min_y l1_max = max(l1_st_y, l1_en_y) if offset1 is not None else line1.max_y - if l2_st_y < l1_min or l2_st_y > l2_max: + if l2_st_y < l1_min or l2_st_y > l1_max: return False, False, None l2_min = min(l2_st_x, l2_en_x) if offset2 is not None else line2.min_x @@ -586,7 +586,7 @@ def unshift_vec(vec): if math.isclose(line2_y_at_line1_x, l1_min) or math.isclose(line2_y_at_line1_x, l1_max): return True, False, vector2.Vector2(l1_st_x, line2_y_at_line1_x) - elif line2_y_at_line1_x < l1_min or line2_y_at_line1_x > l2_max: + elif line2_y_at_line1_x < l1_min or line2_y_at_line1_x > l1_max: return False, False, None else: return False, True, vector2.Vector2(l1_st_x, line2_y_at_line1_x)