(
circle: Circle, p1: Point, p2: Point
)
| 553 | |
| 554 | |
| 555 | def circle_segment_intersect( |
| 556 | circle: Circle, p1: Point, p2: Point |
| 557 | ) -> list[Point]: |
| 558 | l = Line(p1, p2) |
| 559 | px, py = line_circle_intersection(l, circle) |
| 560 | |
| 561 | result = [] |
| 562 | if _check_between(px, p1, p2): |
| 563 | result.append(px) |
| 564 | if _check_between(py, p1, p2): |
| 565 | result.append(py) |
| 566 | return result |
| 567 | |
| 568 | |
| 569 | def line_segment_intersection(l: Line, A: Point, B: Point) -> Point: # pylint: disable=invalid-name |
no test coverage detected