aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/Intersection/LineQuadraticIntersection.cpp
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-24 21:47:16 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-24 21:47:16 +0000
commit9f60291c5375457f8adf228dbe6e8ff1186b13e1 (patch)
tree23019a2d2269d2a4bd2aa4a9a918fc0ba3e17f33 /experimental/Intersection/LineQuadraticIntersection.cpp
parent6c55b513bfbb9d04d0339715637c356cd4858663 (diff)
shape ops work in progress
first 100,000 random cubic/cubic intersections working git-svn-id: http://skia.googlecode.com/svn/trunk@7380 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/Intersection/LineQuadraticIntersection.cpp')
-rw-r--r--experimental/Intersection/LineQuadraticIntersection.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/experimental/Intersection/LineQuadraticIntersection.cpp b/experimental/Intersection/LineQuadraticIntersection.cpp
index 00c3554327..9ec3fb75e0 100644
--- a/experimental/Intersection/LineQuadraticIntersection.cpp
+++ b/experimental/Intersection/LineQuadraticIntersection.cpp
@@ -124,7 +124,7 @@ int intersectRay(double roots[2]) {
double C = r[0];
A += C - 2 * B; // A = a - 2*b + c
B -= C; // B = -(b - c)
- return quadraticRoots(A, B, C, roots);
+ return quadraticRootsValidT(A, 2 * B, C, roots);
}
int intersect() {
@@ -148,7 +148,7 @@ int horizontalIntersect(double axisIntercept, double roots[2]) {
D += F - 2 * E; // D = d - 2*e + f
E -= F; // E = -(d - e)
F -= axisIntercept;
- return quadraticRoots(D, E, F, roots);
+ return quadraticRootsValidT(D, 2 * E, F, roots);
}
int horizontalIntersect(double axisIntercept, double left, double right, bool flipped) {
@@ -177,7 +177,7 @@ int verticalIntersect(double axisIntercept, double roots[2]) {
D += F - 2 * E; // D = d - 2*e + f
E -= F; // E = -(d - e)
F -= axisIntercept;
- return quadraticRoots(D, E, F, roots);
+ return quadraticRootsValidT(D, 2 * E, F, roots);
}
int verticalIntersect(double axisIntercept, double top, double bottom, bool flipped) {