aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkScalar.h
diff options
context:
space:
mode:
authorGravatar ehsan.akhgari <ehsan.akhgari@gmail.com>2014-12-15 12:08:47 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-15 12:08:47 -0800
commit6f90475632b0ff8e9e83916ee6373d3c26cc9284 (patch)
tree14bdd8ebb0291c6391626a52c397c279cf43e932 /include/core/SkScalar.h
parent3fcc125c776c837aa858598ce385f5c6f8f01795 (diff)
Rewrite NaN checks in terms of SkScalarIsNaN()
We are trying to replace Skia's NaN checker with our own in Mozilla, so it would be nice to have to patch a single place by making sure these NaN checks used SkScalarIsNaN(). BUG=skia: Review URL: https://codereview.chromium.org/809443002
Diffstat (limited to 'include/core/SkScalar.h')
-rw-r--r--include/core/SkScalar.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/core/SkScalar.h b/include/core/SkScalar.h
index e0490e2b0b..94c3ce15c0 100644
--- a/include/core/SkScalar.h
+++ b/include/core/SkScalar.h
@@ -127,7 +127,7 @@ static inline bool SkScalarIsFinite(SkScalar x) {
SkScalar prod = x * 0;
// At this point, prod will either be NaN or 0
// Therefore we can return (prod == prod) or (0 == prod).
- return prod == prod;
+ return !SkScalarIsNaN(prod);
}
/**