aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/Intersection/LineIntersection_Test.cpp
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-14 15:29:11 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-14 15:29:11 +0000
commit45a8fc6a8b00451f807783f2a6ec640e9bcc7256 (patch)
treebf483ee177b764a83768534293b9542a5a0c036e /experimental/Intersection/LineIntersection_Test.cpp
parent3976825a21532e254311b90b4a9046e25717e335 (diff)
shape ops work in progress
git-svn-id: http://skia.googlecode.com/svn/trunk@7738 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/Intersection/LineIntersection_Test.cpp')
-rw-r--r--experimental/Intersection/LineIntersection_Test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/experimental/Intersection/LineIntersection_Test.cpp b/experimental/Intersection/LineIntersection_Test.cpp
index ba15192f2c..283d9dfe4b 100644
--- a/experimental/Intersection/LineIntersection_Test.cpp
+++ b/experimental/Intersection/LineIntersection_Test.cpp
@@ -39,20 +39,20 @@ void LineIntersection_Test() {
for (index = firstLineIntersectionTest; index < tests_count; ++index) {
const _Line& line1 = tests[index][0];
const _Line& line2 = tests[index][1];
- double t1[2], t2[2];
- int pts = intersect(line1, line2, t1, t2);
+ Intersections ts;
+ int pts = intersect(line1, line2, ts);
if (!pts) {
printf("%s [%zu] no intersection found\n", __FUNCTION__, index);
}
for (int i = 0; i < pts; ++i) {
_Point result1, result2;
- xy_at_t(line1, t1[i], result1.x, result1.y);
- xy_at_t(line2, t2[i], result2.x, result2.y);
+ xy_at_t(line1, ts.fT[0][i], result1.x, result1.y);
+ xy_at_t(line2, ts.fT[1][i], result2.x, result2.y);
if (!result1.approximatelyEqual(result2)) {
if (pts == 1) {
printf("%s [%zu] not equal\n", __FUNCTION__, index);
} else {
- xy_at_t(line2, t2[i ^ 1], result2.x, result2.y);
+ xy_at_t(line2, ts.fT[1][i ^ 1], result2.x, result2.y);
if (!result1.approximatelyEqual(result2)) {
printf("%s [%zu] not equal\n", __FUNCTION__, index);
}
@@ -63,8 +63,8 @@ void LineIntersection_Test() {
for (index = firstNoIntersectionTest; index < noIntersect_count; ++index) {
const _Line& line1 = noIntersect[index][0];
const _Line& line2 = noIntersect[index][1];
- double t1[2], t2[2];
- int pts = intersect(line1, line2, t1, t2);
+ Intersections ts;
+ int pts = intersect(line1, line2, ts);
if (pts) {
printf("%s [%zu] no intersection expected\n", __FUNCTION__, index);
}