Index: src/pathops/SkDLineIntersection.cpp |
diff --git a/src/pathops/SkDLineIntersection.cpp b/src/pathops/SkDLineIntersection.cpp |
index fca0a04d1f0f4b0953876541ed4cc46ec256eeab..33c8480cd57f646886ddb6bbd0ccf10021d07993 100644 |
--- a/src/pathops/SkDLineIntersection.cpp |
+++ b/src/pathops/SkDLineIntersection.cpp |
@@ -181,7 +181,7 @@ static int horizontal_coincident(const SkDLine& line, double y) { |
} |
static double horizontal_intercept(const SkDLine& line, double y) { |
- return (y - line[0].fY) / (line[1].fY - line[0].fY); |
+ return SkPinT((y - line[0].fY) / (line[1].fY - line[0].fY)); |
} |
int SkIntersections::horizontal(const SkDLine& line, double y) { |
@@ -267,7 +267,7 @@ static int vertical_coincident(const SkDLine& line, double x) { |
} |
static double vertical_intercept(const SkDLine& line, double x) { |
- return (x - line[0].fX) / (line[1].fX - line[0].fX); |
+ return SkPinT((x - line[0].fX) / (line[1].fX - line[0].fX)); |
} |
int SkIntersections::vertical(const SkDLine& line, double x) { |