aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/effects/gradients/Sk4fLinearGradient.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/effects/gradients/Sk4fLinearGradient.cpp b/src/effects/gradients/Sk4fLinearGradient.cpp
index 4953ce25a1..354c941a86 100644
--- a/src/effects/gradients/Sk4fLinearGradient.cpp
+++ b/src/effects/gradients/Sk4fLinearGradient.cpp
@@ -111,13 +111,13 @@ SkScalar pinFx<SkShader::kMirror_TileMode>(SkScalar fx) {
return f;
}
-// true when x is in [k1,k2), or [k2, k1) when the interval is reversed.
+// true when x is in [k1,k2], or [k2, k1] when the interval is reversed.
// TODO(fmalita): hoist the reversed interval check out of this helper.
bool in_range(SkScalar x, SkScalar k1, SkScalar k2) {
SkASSERT(k1 != k2);
return (k1 < k2)
- ? (x >= k1 && x < k2)
- : (x >= k2 && x < k1);
+ ? (x >= k1 && x <= k2)
+ : (x >= k2 && x <= k1);
}
} // anonymous namespace