diff options
author | 2013-02-07 13:13:41 +0000 | |
---|---|---|
committer | 2013-02-07 13:13:41 +0000 | |
commit | beda389e646d6be3cfef853584a78ca8ba39d0fc (patch) | |
tree | 2233d325407b886bfaf69ad94efed94a4b30f9fb /experimental/Intersection/LineIntersection.cpp | |
parent | 709906b74dc0179609e9f1455dc6e9e13675c0fa (diff) |
shape ops work in progress
git-svn-id: http://skia.googlecode.com/svn/trunk@7637 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/Intersection/LineIntersection.cpp')
-rw-r--r-- | experimental/Intersection/LineIntersection.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/experimental/Intersection/LineIntersection.cpp b/experimental/Intersection/LineIntersection.cpp index 58d00b830b..6ab393684f 100644 --- a/experimental/Intersection/LineIntersection.cpp +++ b/experimental/Intersection/LineIntersection.cpp @@ -51,8 +51,9 @@ int intersect(const _Line& a, const _Line& b, double aRange[2], double bRange[2] || (numerB < 0 && denom > numerB) || (numerB > 0 && denom < numerB); numerA /= denom; numerB /= denom; - if (!approximately_zero(denom) || (!approximately_zero_inverse(numerA) && - !approximately_zero_inverse(numerB))) { + if ((!approximately_zero(denom) || (!approximately_zero_inverse(numerA) + && !approximately_zero_inverse(numerB))) && !sk_double_isnan(numerA) + && !sk_double_isnan(numerB)) { if (mayNotOverlap) { return 0; } |