shape ops work in progress
git-svn-id: http://skia.googlecode.com/svn/trunk@7738 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/experimental/Intersection/QuadraticBounds.cpp b/experimental/Intersection/QuadraticBounds.cpp
index a86b7ed..193743b 100644
--- a/experimental/Intersection/QuadraticBounds.cpp
+++ b/experimental/Intersection/QuadraticBounds.cpp
@@ -8,11 +8,6 @@
#include "CurveUtilities.h"
#include "Extrema.h"
-static int isBoundedByEndPoints(double a, double b, double c)
-{
- return (a <= b && b <= c) || (a >= b && b >= c);
-}
-
double leftMostT(const Quadratic& quad, double startT, double endT) {
double leftT;
if (findExtrema(quad[0].x, quad[1].x, quad[2].x, &leftT)
@@ -31,12 +26,11 @@
add(quad[2]);
double tValues[2];
int roots = 0;
- if (!isBoundedByEndPoints(quad[0].x, quad[1].x, quad[2].x)) {
+ if (!between(quad[0].x, quad[1].x, quad[2].x)) {
roots = findExtrema(quad[0].x, quad[1].x, quad[2].x, tValues);
}
- if (!isBoundedByEndPoints(quad[0].y, quad[1].y, quad[2].y)) {
- roots += findExtrema(quad[0].y, quad[1].y, quad[2].y,
- &tValues[roots]);
+ if (!between(quad[0].y, quad[1].y, quad[2].y)) {
+ roots += findExtrema(quad[0].y, quad[1].y, quad[2].y, &tValues[roots]);
}
for (int x = 0; x < roots; ++x) {
_Point result;