caryclark@google.com | 639df89 | 2012-01-10 21:46:10 +0000 | [diff] [blame^] | 1 | #include "CubicIntersection_Tests.h" |
| 2 | #include "LineIntersection.h" |
| 3 | |
| 4 | const _Line tests[][2] = { |
| 5 | {{{166.86950047022856, 112.69654129527828}, {166.86948801592692, 112.69655741235339}}, |
| 6 | {{166.86960700313026, 112.6965477747386}, {166.86925794355412, 112.69656471103423}}}, |
| 7 | }; |
| 8 | |
| 9 | const size_t tests_count = sizeof(tests) / sizeof(tests[0]); |
| 10 | |
| 11 | static size_t firstLineIntersectionTest = 0; |
| 12 | |
| 13 | void LineIntersection_Test() { |
| 14 | for (size_t index = firstLineIntersectionTest; index < tests_count; ++index) { |
| 15 | const _Line& line1 = tests[index][0]; |
| 16 | const _Line& line2 = tests[index][1]; |
| 17 | _Point result; |
| 18 | lineIntersect(line1, line2, &result); |
| 19 | printf("%s (%g,%g)\n", __FUNCTION__, result.x, result.y); |
| 20 | } |
| 21 | } |