Index: src/core/SkGeometry.cpp |
diff --git a/src/core/SkGeometry.cpp b/src/core/SkGeometry.cpp |
index 7256b9e517ec5e401c6e6838dbc6245392b99f85..760b9b4e1c751543569750277a7fe2c5a6feca88 100644 |
--- a/src/core/SkGeometry.cpp |
+++ b/src/core/SkGeometry.cpp |
@@ -743,7 +743,7 @@ static int solve_cubic_poly(const SkScalar coeff[4], SkScalar tValues[3]) { |
SkScalar r; |
if (R2MinusQ3 < 0) { // we have 3 real roots |
- SkScalar theta = SkScalarACos(R / SkScalarSqrt(Q3)); |
+ SkScalar theta = SkScalarACos(SkScalarPin(R / SkScalarSqrt(Q3), -1, 1)); // bug.skia.org/5222 |
reed1
2016/05/25 17:12:52
Perhaps ah comment as to why we pin ...
1. the div
|
SkScalar neg2RootQ = -2 * SkScalarSqrt(Q); |
r = neg2RootQ * SkScalarCos(theta/3) - adiv3; |