aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/SkFloatingPoint.h
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-05-23 12:12:21 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-23 16:54:32 +0000
commitee43091c1b8ebf2f62918688494b0eb82ceedb38 (patch)
treefea93d4f7d455abea54ebd182fcbbe69e3ca3d19 /include/private/SkFloatingPoint.h
parentd7e22273e1e522eab57976e08b339b1532a8fd01 (diff)
fix 0.499999f rounding case for triangles
Bug: skia:7994 Change-Id: I83bb309a2c8fb0bddaf78ba32c0a07537e483900 Reviewed-on: https://skia-review.googlesource.com/129648 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'include/private/SkFloatingPoint.h')
-rw-r--r--include/private/SkFloatingPoint.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/private/SkFloatingPoint.h b/include/private/SkFloatingPoint.h
index adf7b279b9..6cb4cf1542 100644
--- a/include/private/SkFloatingPoint.h
+++ b/include/private/SkFloatingPoint.h
@@ -124,7 +124,7 @@ static inline int64_t sk_float_saturate2int64(float x) {
#define sk_double_round(x) floor((x) + 0.5)
#define sk_double_ceil(x) ceil(x)
#define sk_double_floor2int(x) (int)floor(x)
-#define sk_double_round2int(x) (int)floor((x) + 0.5f)
+#define sk_double_round2int(x) (int)floor((x) + 0.5)
#define sk_double_ceil2int(x) (int)ceil(x)
// Cast double to float, ignoring any warning about too-large finite values being cast to float.