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

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

Issue 109433013: Move geometric types to a separate, more lightweight target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/vector2d_f.h" 5 #include "ui/gfx/geometry/vector2d_f.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 12
13 std::string Vector2dF::ToString() const { 13 std::string Vector2dF::ToString() const {
14 return base::StringPrintf("[%f %f]", x_, y_); 14 return base::StringPrintf("[%f %f]", x_, y_);
15 } 15 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 static_cast<double>(lhs.y()) * rhs.y(); 51 static_cast<double>(lhs.y()) * rhs.y();
52 } 52 }
53 53
54 Vector2dF ScaleVector2d(const Vector2dF& v, float x_scale, float y_scale) { 54 Vector2dF ScaleVector2d(const Vector2dF& v, float x_scale, float y_scale) {
55 Vector2dF scaled_v(v); 55 Vector2dF scaled_v(v);
56 scaled_v.Scale(x_scale, y_scale); 56 scaled_v.Scale(x_scale, y_scale);
57 return scaled_v; 57 return scaled_v;
58 } 58 }
59 59
60 } // namespace gfx 60 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698