(a, b)
| 2094 | |
| 2095 | // check if a polygon diagonal intersects any polygon segments |
| 2096 | function intersectsPolygon(a, b) { |
| 2097 | var p = a; |
| 2098 | do { |
| 2099 | if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b)) return true; |
| 2100 | p = p.next; |
| 2101 | } while (p !== a); |
| 2102 | |
| 2103 | return false; |
| 2104 | } |
| 2105 | |
| 2106 | // check if a polygon diagonal is locally inside the polygon |
| 2107 | function locallyInside(a, b) { |
no test coverage detected