blob: f7d00b553b13a16ef2d9fcfc6065dc60c5517548 [file] [log] [blame]
caryclark@google.com639df892012-01-10 21:46:10 +00001#include "CubicIntersection_Tests.h"
2#include "LineIntersection.h"
3
4const _Line tests[][2] = {
5 {{{166.86950047022856, 112.69654129527828}, {166.86948801592692, 112.69655741235339}},
6 {{166.86960700313026, 112.6965477747386}, {166.86925794355412, 112.69656471103423}}},
7};
8
9const size_t tests_count = sizeof(tests) / sizeof(tests[0]);
10
11static size_t firstLineIntersectionTest = 0;
12
13void 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}