diff options
author | caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-02 14:49:34 +0000 |
---|---|---|
committer | caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-02 14:49:34 +0000 |
commit | 7eaa53d8f7e48fd17d02b5e3bd91f90e9c1899ef (patch) | |
tree | 057de94d997d99e897c68157f7444fbca687ebf9 /src/pathops/SkPathOpsCubic.cpp | |
parent | 77af6805e5faea1e2a5c0220098aec9082f3a6e5 (diff) |
path ops work in progress
make more skps work
remove edit files
BUG=
Review URL: https://codereview.chromium.org/23542056
git-svn-id: http://skia.googlecode.com/svn/trunk@11570 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pathops/SkPathOpsCubic.cpp')
-rw-r--r-- | src/pathops/SkPathOpsCubic.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pathops/SkPathOpsCubic.cpp b/src/pathops/SkPathOpsCubic.cpp index 662219acf5..8e8ec47bf9 100644 --- a/src/pathops/SkPathOpsCubic.cpp +++ b/src/pathops/SkPathOpsCubic.cpp @@ -155,7 +155,7 @@ int SkDCubic::RootsReal(double A, double B, double C, double D, double s[3]) { if (approximately_zero(A + B + C + D)) { // 1 is one root int num = SkDQuad::RootsReal(A, A + B, -D, s); for (int i = 0; i < num; ++i) { - if (AlmostEqualUlps(s[i], 1)) { + if (AlmostDequalUlps(s[i], 1)) { return num; } } @@ -186,11 +186,11 @@ int SkDCubic::RootsReal(double A, double B, double C, double D, double s[3]) { *roots++ = r; r = neg2RootQ * cos((theta + 2 * PI) / 3) - adiv3; - if (!AlmostEqualUlps(s[0], r)) { + if (!AlmostDequalUlps(s[0], r)) { *roots++ = r; } r = neg2RootQ * cos((theta - 2 * PI) / 3) - adiv3; - if (!AlmostEqualUlps(s[0], r) && (roots - s == 1 || !AlmostEqualUlps(s[1], r))) { + if (!AlmostDequalUlps(s[0], r) && (roots - s == 1 || !AlmostDequalUlps(s[1], r))) { *roots++ = r; } } else { // we have 1 real root @@ -205,9 +205,9 @@ int SkDCubic::RootsReal(double A, double B, double C, double D, double s[3]) { } r = A - adiv3; *roots++ = r; - if (AlmostEqualUlps(R2, Q3)) { + if (AlmostDequalUlps(R2, Q3)) { r = -A / 2 - adiv3; - if (!AlmostEqualUlps(s[0], r)) { + if (!AlmostDequalUlps(s[0], r)) { *roots++ = r; } } |