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

Side by Side Diff: ui/gfx/vector2d_f.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/stringprintf.h"
6 #include "ui/gfx/vector2d_f.h"
7
8 namespace gfx {
9
10 Vector2dF::Vector2dF()
11 : m_x(0),
12 m_y(0) {
13 }
14
15 Vector2dF::Vector2dF(float x, float y)
16 : m_x(x),
17 m_y(y) {
18 }
19
20 std::string Vector2dF::ToString() const {
21 return base::StringPrintf("[%f %f]", m_x, m_y);
22 }
23
24 } // namespace gfx
OLDNEW
« ui/gfx/vector2d_f.h ('K') | « ui/gfx/vector2d_f.h ('k') | ui/ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698