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

Unified Diff: include/core/SkTypes.h

Issue 13934009: path ops -- use standard max, min, double-is-nan (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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 | « include/core/SkFloatingPoint.h ('k') | src/pathops/SkDCubicIntersection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTypes.h
===================================================================
--- include/core/SkTypes.h (revision 8808)
+++ include/core/SkTypes.h (working copy)
@@ -314,6 +314,14 @@
return a;
}
+template <typename T> const T& SkTMin(const T& a, const T& b) {
+ return (a < b) ? a : b;
+}
+
+template <typename T> const T& SkTMax(const T& a, const T& b) {
+ return (b < a) ? a : b;
+}
+
static inline int32_t SkSign32(int32_t a) {
return (a >> 31) | ((unsigned) -a >> 31);
}
« no previous file with comments | « include/core/SkFloatingPoint.h ('k') | src/pathops/SkDCubicIntersection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698