(x0, y0, x1, y1, x2, y2, x3, y3)
| 94353 | } |
| 94354 | |
| 94355 | function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { |
| 94356 | var x10 = x1 - x0, |
| 94357 | y10 = y1 - y0, |
| 94358 | x32 = x3 - x2, |
| 94359 | y32 = y3 - y2, |
| 94360 | t = y32 * x10 - x32 * y10; |
| 94361 | if (t * t < _math.epsilon) return; |
| 94362 | t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; |
| 94363 | return [x0 + t * x10, y0 + t * y10]; |
| 94364 | } // Compute perpendicular offset line of length rc. |
| 94365 | // http://mathworld.wolfram.com/Circle-LineIntersection.html |
| 94366 | |
| 94367 |
no test coverage detected