Index: src/pathops/SkPathOpsPoint.h |
diff --git a/src/pathops/SkPathOpsPoint.h b/src/pathops/SkPathOpsPoint.h |
index 534154f199ccd2994026e6d286600e96cdbfc97b..ad959b6669988fd12818286a5ad15f4b3e00d7bd 100644 |
--- a/src/pathops/SkPathOpsPoint.h |
+++ b/src/pathops/SkPathOpsPoint.h |
@@ -111,14 +111,8 @@ struct SkDPoint { |
} |
bool approximatelyEqual(const SkPoint& a) const { |
- double denom = SkTMax(fabs(fX), SkTMax(fabs(fY), |
- SkScalarToDouble(SkTMax(fabsf(a.fX), fabsf(a.fY))))); |
- if (denom == 0) { |
- return true; |
- } |
- double inv = 1 / denom; |
- return approximately_equal_double(fX * inv, a.fX * inv) |
- && approximately_equal_double(fY * inv, a.fY * inv); |
+ return AlmostEqualUlps(SkDoubleToScalar(fX), a.fX) |
+ && AlmostEqualUlps(SkDoubleToScalar(fY), a.fY); |
} |
bool approximatelyEqualHalf(const SkDPoint& a) const { |