| 5 | #include "line_intersection.h" |
| 6 | |
| 7 | int main() { |
| 8 | pt res; |
| 9 | line m{1, -1, 2}; // y = x + 2 |
| 10 | line n{-0.5, -1, 4}; // y = -0.5x + 4 |
| 11 | assert(intersect(m, n, res)); |
| 12 | assert(abs(res.x - 4. / 3.) < 1e-7); |
| 13 | assert(abs(res.y - 10. / 3.) < 1e-7); |
| 14 | } |
nothing calls this directly
no outgoing calls
no test coverage detected