Index: src/pathops/SkPathOpsTypes.h |
diff --git a/src/pathops/SkPathOpsTypes.h b/src/pathops/SkPathOpsTypes.h |
index 20641d334538f759a188f84236231a370641a999..c988691e26899ee77cb80dd77cdb0f933e40c58b 100644 |
--- a/src/pathops/SkPathOpsTypes.h |
+++ b/src/pathops/SkPathOpsTypes.h |
@@ -33,6 +33,11 @@ inline bool RoughlyEqualUlps(double A, double B) { |
return RoughlyEqualUlps(SkDoubleToScalar(A), SkDoubleToScalar(B)); |
} |
+bool AlmostBetweenUlps(float a, float b, float c); |
+inline bool AlmostBetweenUlps(double A, double B, double C) { |
+ return AlmostBetweenUlps(SkDoubleToScalar(A), SkDoubleToScalar(B), SkDoubleToScalar(C)); |
+} |
+ |
// FLT_EPSILON == 1.19209290E-07 == 1 / (2 ^ 23) |
// DBL_EPSILON == 2.22045e-16 |
const double FLT_EPSILON_CUBED = FLT_EPSILON * FLT_EPSILON * FLT_EPSILON; |
@@ -260,4 +265,8 @@ inline int SkDSideBit(double x) { |
return 1 << SKDSide(x); |
} |
+inline double SkPinT(double t) { |
+ return precisely_less_than_zero(t) ? 0 : precisely_greater_than_one(t) ? 1 : t; |
+} |
+ |
#endif |