(points: list[Point])
| 671 | |
| 672 | |
| 673 | def check_sameside(points: list[Point]) -> bool: |
| 674 | b, a, c, y, x, z = points |
| 675 | # whether b is to the same side of a & c as y is to x & z |
| 676 | ba = b - a |
| 677 | bc = b - c |
| 678 | yx = y - x |
| 679 | yz = y - z |
| 680 | return ba.dot(bc) * yx.dot(yz) > 0 |
| 681 | |
| 682 | |
| 683 | def check_para_or_coll(points: list[Point]) -> bool: |