(
newpoints: list[Point], points: list[Point], tol: int = 0.1
)
| 586 | |
| 587 | |
| 588 | def check_too_close( |
| 589 | newpoints: list[Point], points: list[Point], tol: int = 0.1 |
| 590 | ) -> bool: |
| 591 | if not points: |
| 592 | return False |
| 593 | avg = sum(points, Point(0.0, 0.0)) * 1.0 / len(points) |
| 594 | mindist = min([p.distance(avg) for p in points]) |
| 595 | for p0 in newpoints: |
| 596 | for p1 in points: |
| 597 | if p0.distance(p1) < tol * mindist: |
| 598 | return True |
| 599 | return False |
| 600 | |
| 601 | |
| 602 | def check_too_far( |
no test coverage detected