diff options
Diffstat (limited to 'experimental/Intersection/CubicReduceOrder.cpp')
-rw-r--r-- | experimental/Intersection/CubicReduceOrder.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/experimental/Intersection/CubicReduceOrder.cpp b/experimental/Intersection/CubicReduceOrder.cpp index 294d18c440..d1775d89f2 100644 --- a/experimental/Intersection/CubicReduceOrder.cpp +++ b/experimental/Intersection/CubicReduceOrder.cpp @@ -69,13 +69,13 @@ static int check_quadratic(const Cubic& cubic, Cubic& reduction) { double dx10 = cubic[1].x - cubic[0].x; double dx23 = cubic[2].x - cubic[3].x; double midX = cubic[0].x + dx10 * 3 / 2; - if (!approximately_equal(midX - cubic[3].x, dx23 * 3 / 2)) { + if (!AlmostEqualUlps(midX - cubic[3].x, dx23 * 3 / 2)) { return 0; } double dy10 = cubic[1].y - cubic[0].y; double dy23 = cubic[2].y - cubic[3].y; double midY = cubic[0].y + dy10 * 3 / 2; - if (!approximately_equal(midY - cubic[3].y, dy23 * 3 / 2)) { + if (!AlmostEqualUlps(midY - cubic[3].y, dy23 * 3 / 2)) { return 0; } reduction[0] = cubic[0]; @@ -92,7 +92,7 @@ static int check_linear(const Cubic& cubic, Cubic& reduction, while (cubic[startIndex].approximatelyEqual(cubic[endIndex])) { --endIndex; if (endIndex == 0) { - printf("%s shouldn't get here if all four points are about equal", __FUNCTION__); + printf("%s shouldn't get here if all four points are about equal\n", __FUNCTION__); assert(0); } } @@ -213,10 +213,10 @@ int reduceOrder(const Cubic& cubic, Cubic& reduction, ReduceOrder_Flags allowQua } } for (index = 0; index < 4; ++index) { - if (approximately_equal(cubic[index].x, cubic[minX].x)) { + if (AlmostEqualUlps(cubic[index].x, cubic[minX].x)) { minXSet |= 1 << index; } - if (approximately_equal(cubic[index].y, cubic[minY].y)) { + if (AlmostEqualUlps(cubic[index].y, cubic[minY].y)) { minYSet |= 1 << index; } } |