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

Unified Diff: third_party/WebKit/Source/platform/geometry/FloatPoint.cpp

Issue 2342913003: Replace narrowPrecisionToFloat with clampTo<float> (Closed)
Patch Set: Created 4 years, 3 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
Index: third_party/WebKit/Source/platform/geometry/FloatPoint.cpp
diff --git a/third_party/WebKit/Source/platform/geometry/FloatPoint.cpp b/third_party/WebKit/Source/platform/geometry/FloatPoint.cpp
index ce6fe82b86fe223f058b4a2690212f020e6cabc8..c4505559b4ab2ec2c2792f4849cbeb8bea2d25e9 100644
--- a/third_party/WebKit/Source/platform/geometry/FloatPoint.cpp
+++ b/third_party/WebKit/Source/platform/geometry/FloatPoint.cpp
@@ -27,10 +27,10 @@
#include "platform/geometry/FloatPoint.h"
#include "SkPoint.h"
-#include "platform/FloatConversion.h"
#include "platform/geometry/DoublePoint.h"
#include "platform/geometry/LayoutPoint.h"
#include "platform/geometry/LayoutSize.h"
+#include "wtf/MathExtras.h"
#include "wtf/text/WTFString.h"
#include <limits>
#include <math.h>
@@ -92,7 +92,7 @@ SkPoint FloatPoint::data() const
FloatPoint FloatPoint::narrowPrecision(double x, double y)
{
- return FloatPoint(narrowPrecisionToFloat(x), narrowPrecisionToFloat(y));
+ return FloatPoint(clampTo<float>(x), clampTo<float>(y));
}
bool findIntersection(const FloatPoint& p1, const FloatPoint& p2, const FloatPoint& d1, const FloatPoint& d2, FloatPoint& intersection)
« no previous file with comments | « third_party/WebKit/Source/platform/audio/HRTFKernel.cpp ('k') | third_party/WebKit/Source/platform/geometry/FloatRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698