path ops work in progress
fix bugs in tests on 32 bit release
Most changes revolve around pinning computed t values
very close to zero and one.
git-svn-id: http://skia.googlecode.com/svn/trunk@8745 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pathops/SkDLineIntersection.cpp b/src/pathops/SkDLineIntersection.cpp
index 8b02030..93f0353 100644
--- a/src/pathops/SkDLineIntersection.cpp
+++ b/src/pathops/SkDLineIntersection.cpp
@@ -158,7 +158,7 @@
return result;
}
double xIntercept = line[0].fX + fT[0][0] * (line[1].fX - line[0].fX);
- if (xIntercept > right || xIntercept < left) {
+ if (!precisely_between(left, xIntercept, right)) {
return fUsed = 0;
}
return result;
@@ -172,7 +172,7 @@
break;
case 1: {
double xIntercept = line[0].fX + fT[0][0] * (line[1].fX - line[0].fX);
- if (xIntercept > right || xIntercept < left) {
+ if (!precisely_between(left, xIntercept, right)) {
return fUsed = 0;
}
fT[1][0] = (xIntercept - left) / (right - left);
@@ -213,7 +213,7 @@
if (min > max) {
SkTSwap(min, max);
}
- if (min > x || max < x) {
+ if (!precisely_between(min, x, max)) {
return fUsed = 0;
}
if (AlmostEqualUlps(min, max)) {
@@ -233,7 +233,7 @@
break;
case 1: {
double yIntercept = line[0].fY + fT[0][0] * (line[1].fY - line[0].fY);
- if (yIntercept > bottom || yIntercept < top) {
+ if (!precisely_between(top, yIntercept, bottom)) {
return fUsed = 0;
}
fT[1][0] = (yIntercept - top) / (bottom - top);