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

Unified Diff: Source/platform/geometry/FloatSize.h

Issue 641643004: Reapply the non-MathExtras parts of (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « Source/platform/geometry/FloatPoint.h ('k') | Source/platform/geometry/IntRect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/geometry/FloatSize.h
diff --git a/Source/platform/geometry/FloatSize.h b/Source/platform/geometry/FloatSize.h
index 1d73c75d5ac9bd0b66ac1289fdb46fef8c631960..64f76663eec3687897e1434b7894b645acb63b86 100644
--- a/Source/platform/geometry/FloatSize.h
+++ b/Source/platform/geometry/FloatSize.h
@@ -176,22 +176,22 @@ inline bool operator!=(const FloatSize& a, const FloatSize& b)
inline IntSize roundedIntSize(const FloatSize& p)
{
- return IntSize(clampToInteger(roundf(p.width())), clampToInteger(roundf(p.height())));
+ return IntSize(clampTo<int>(roundf(p.width())), clampTo<int>(roundf(p.height())));
}
inline IntSize flooredIntSize(const FloatSize& p)
{
- return IntSize(clampToInteger(floorf(p.width())), clampToInteger(floorf(p.height())));
+ return IntSize(clampTo<int>(floorf(p.width())), clampTo<int>(floorf(p.height())));
}
inline IntSize expandedIntSize(const FloatSize& p)
{
- return IntSize(clampToInteger(ceilf(p.width())), clampToInteger(ceilf(p.height())));
+ return IntSize(clampTo<int>(ceilf(p.width())), clampTo<int>(ceilf(p.height())));
}
inline IntPoint flooredIntPoint(const FloatSize& p)
{
- return IntPoint(clampToInteger(floorf(p.width())), clampToInteger(floorf(p.height())));
+ return IntPoint(clampTo<int>(floorf(p.width())), clampTo<int>(floorf(p.height())));
}
} // namespace blink
« no previous file with comments | « Source/platform/geometry/FloatPoint.h ('k') | Source/platform/geometry/IntRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698