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

Unified Diff: Source/platform/geometry/FloatPoint.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/DoubleSize.h ('k') | Source/platform/geometry/FloatSize.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/geometry/FloatPoint.h
diff --git a/Source/platform/geometry/FloatPoint.h b/Source/platform/geometry/FloatPoint.h
index 445f60262b9cc297b52d4c30461c0dd484991a4e..2790757969a2f705f5b97cca4f790014d8aa53e9 100644
--- a/Source/platform/geometry/FloatPoint.h
+++ b/Source/platform/geometry/FloatPoint.h
@@ -215,22 +215,22 @@ inline float operator*(const FloatPoint& a, const FloatPoint& b)
inline IntPoint roundedIntPoint(const FloatPoint& p)
{
- return IntPoint(clampToInteger(roundf(p.x())), clampToInteger(roundf(p.y())));
+ return IntPoint(clampTo<int>(roundf(p.x())), clampTo<int>(roundf(p.y())));
}
inline IntPoint flooredIntPoint(const FloatPoint& p)
{
- return IntPoint(clampToInteger(floorf(p.x())), clampToInteger(floorf(p.y())));
+ return IntPoint(clampTo<int>(floorf(p.x())), clampTo<int>(floorf(p.y())));
}
inline IntPoint ceiledIntPoint(const FloatPoint& p)
{
- return IntPoint(clampToInteger(ceilf(p.x())), clampToInteger(ceilf(p.y())));
+ return IntPoint(clampTo<int>(ceilf(p.x())), clampTo<int>(ceilf(p.y())));
}
inline IntSize flooredIntSize(const FloatPoint& p)
{
- return IntSize(clampToInteger(floorf(p.x())), clampToInteger(floorf(p.y())));
+ return IntSize(clampTo<int>(floorf(p.x())), clampTo<int>(floorf(p.y())));
}
inline FloatSize toFloatSize(const FloatPoint& a)
« no previous file with comments | « Source/platform/geometry/DoubleSize.h ('k') | Source/platform/geometry/FloatSize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698