Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: include/core/SkFloatingPoint.h

Issue 645793006: add round/ceil/etc. for SkMScalar (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add test Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/utils/SkMatrix44.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkFloatingPoint.h
diff --git a/include/core/SkFloatingPoint.h b/include/core/SkFloatingPoint.h
index f85c456aa88cd89fc1ec9508a5826d2c01848348..1003b80b4f1109db3730c54d0b76ede4ae865703 100644
--- a/include/core/SkFloatingPoint.h
+++ b/include/core/SkFloatingPoint.h
@@ -116,6 +116,13 @@ static inline float sk_float_copysign(float x, float y) {
#define sk_float_ceil2int(x) (int)sk_float_ceil(x)
#endif
+#define sk_double_floor(x) floor(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_ceil2int(x) (int)ceil(x)
+
extern const uint32_t gIEEENotANumber;
extern const uint32_t gIEEEInfinity;
extern const uint32_t gIEEENegativeInfinity;
« no previous file with comments | « no previous file | include/utils/SkMatrix44.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698