Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0cbad6

Browse files
committed
removed more logs and corrected to flake8
1 parent d32026c commit e0cbad6

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

lib/matplotlib/tests/test_path.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,16 +410,16 @@ def test_path_intersect_path(phi):
410410
b = transform.transform_path(Path([(0, 1), (0, 2), (0, 5)]))
411411
assert a.intersects_path(b) and b.intersects_path(a)
412412

413-
# test added to adress issue #20328
413+
# test added to adress issue #20328
414414
a = transform.transform_path(Path([(1, -1), (0, -1)]))
415415
b = transform.transform_path(Path([(0, 1), (0.9, 1)]))
416416
assert not a.intersects_path(b) and not b.intersects_path(a)
417417

418-
# test added to adress issue #20328
418+
# test added to adress issue #20328
419419
a = transform.transform_path(Path([(0., -5.), (1., -5.)]))
420420
b = transform.transform_path(Path([(1., 5.), (0., 5.)]))
421421
assert not a.intersects_path(b) and not b.intersects_path(a)
422-
422+
423423

424424
@pytest.mark.parametrize('offset', range(-720, 361, 45))
425425
def test_full_arc(offset):

src/_path.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,7 @@ inline bool segments_intersect(const double &x1,
836836
// If den == 0 we have two possibilities:
837837
if (isclose(den, 0.0)) {
838838
float t_area = (x2*y3 - x3*y2) - x1*(y3 - y2) + y1*(x3 - x2);
839-
printf("t_area: %f\n", t_area);
840-
// 1 - If the area of the triangle made by the 3 first points (2 from the first segment
839+
// 1 - If the area of the triangle made by the 3 first points (2 from the first segment
841840
// plus one from the second) is zero, they are collinear
842841
if (isclose(t_area, 0.0)) {
843842
if (x1 == x2 && x2 == x3) { // segments have infinite slope (vertical lines)
@@ -904,15 +903,6 @@ bool path_intersects_path(PathIterator1 &p1, PathIterator2 &p2)
904903
if ((isclose((x21 - x22) * (x21 - x22) + (y21 - y22) * (y21 - y22), 0))){
905904
continue;
906905
}
907-
//xx printf("\nsegment 1:\n");
908-
//xx printf("( %4.2f, %4.2f )", x11, y11);
909-
//xx printf("( %4.2f, %4.2f )", x12, y12);
910-
911-
//xx printf("\nsegment 2:\n");
912-
//xx printf("( %4.2f, %4.2f )", x21, y21);
913-
//xx printf("( %4.2f, %4.2f )", x22, y22);
914-
915-
//xx printf("intersects? %d", segments_intersect(x11, y11, x12, y12, x21, y21, x22, y22));
916906

917907
if (segments_intersect(x11, y11, x12, y12, x21, y21, x22, y22)) {
918908
return true;

0 commit comments

Comments
 (0)