| 260 | } |
| 261 | |
| 262 | bool Vec2::isLineParallel(const Vec2& A, const Vec2& B, const Vec2& C, const Vec2& D) |
| 263 | { |
| 264 | // FAIL: Line undefined |
| 265 | if ((A.x == B.x && A.y == B.y) || (C.x == D.x && C.y == D.y)) |
| 266 | { |
| 267 | return false; |
| 268 | } |
| 269 | |
| 270 | if (crossProduct2Vector(A, B, C, D) == 0) |
| 271 | { |
| 272 | // line overlap |
| 273 | if (crossProduct2Vector(C, D, C, A) == 0 || crossProduct2Vector(A, B, C, A) == 0) |
| 274 | { |
| 275 | return false; |
| 276 | } |
| 277 | |
| 278 | return true; |
| 279 | } |
| 280 | |
| 281 | return false; |
| 282 | } |
| 283 | |
| 284 | bool Vec2::isLineOverlap(const Vec2& A, const Vec2& B, const Vec2& C, const Vec2& D) |
| 285 | { |
nothing calls this directly
no test coverage detected