Index: src/core/SkPoint.cpp |
diff --git a/src/core/SkPoint.cpp b/src/core/SkPoint.cpp |
index 20bc33666eb053ff8428af8d920d3f4ffb499596..aabde2786dc11339c80b04d31cf2f28eb376ffdd 100644 |
--- a/src/core/SkPoint.cpp |
+++ b/src/core/SkPoint.cpp |
@@ -223,7 +223,9 @@ SkScalar SkPoint::distanceToLineBetweenSqd(const SkPoint& a, |
1 == kRight_Side); |
*side = (Side) SkScalarSignAsInt(det); |
} |
- return SkScalarMulDiv(det, det, uLengthSqd); |
+ SkScalar temp = det / uLengthSqd; |
+ temp *= det; |
+ return temp; |
} |
SkScalar SkPoint::distanceToLineSegmentBetweenSqd(const SkPoint& a, |
@@ -256,6 +258,8 @@ SkScalar SkPoint::distanceToLineSegmentBetweenSqd(const SkPoint& a, |
return b.distanceToSqd(*this); |
} else { |
SkScalar det = u.cross(v); |
- return SkScalarMulDiv(det, det, uLengthSqd); |
+ SkScalar temp = det / uLengthSqd; |
+ temp *= det; |
+ return temp; |
} |
} |