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

Unified Diff: ui/gfx/point_f.cc

Issue 10993094: Make adding and subtracting gfx:: point types simpler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove some patch noise Created 8 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: ui/gfx/point_f.cc
diff --git a/ui/gfx/point_f.cc b/ui/gfx/point_f.cc
index bdc4a6621f36807c3fcd012bf1cdac1fc1f5bb9e..89ceefee8778806adfbb0ac149e3164cc8fec92d 100644
--- a/ui/gfx/point_f.cc
+++ b/ui/gfx/point_f.cc
@@ -7,7 +7,6 @@
#include <cmath>
#include "base/stringprintf.h"
-#include "ui/gfx/point.h"
namespace gfx {
@@ -19,11 +18,12 @@ PointF::PointF() : PointBase<PointF, float>(0, 0) {
PointF::PointF(float x, float y) : PointBase<PointF, float>(x, y) {
}
-Point PointF::ToPoint() const {
- return Point(static_cast<int>(std::floor(x())),
- static_cast<int>(std::floor(y())));
+PointF::PointF(const PointF& other)
+ : PointBase<PointF, float>(other.x(), other.y()) {
}
+PointF::~PointF() {}
+
std::string PointF::ToString() const {
return base::StringPrintf("%f,%f", x(), y());
}

Powered by Google App Engine
This is Rietveld 408576698