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

Side by Side Diff: cc/base/math_util.h

Issue 14772032: Trace picture piles on layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | cc/base/math_util.cc » ('j') | cc/base/math_util.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CC_BASE_MATH_UTIL_H_ 5 #ifndef CC_BASE_MATH_UTIL_H_
6 #define CC_BASE_MATH_UTIL_H_ 6 #define CC_BASE_MATH_UTIL_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 static float SmallestAngleBetweenVectors(gfx::Vector2dF v1, 138 static float SmallestAngleBetweenVectors(gfx::Vector2dF v1,
139 gfx::Vector2dF v2); 139 gfx::Vector2dF v2);
140 140
141 // Projects the |source| vector onto |destination|. Neither vector is assumed 141 // Projects the |source| vector onto |destination|. Neither vector is assumed
142 // to be normalized. 142 // to be normalized.
143 static gfx::Vector2dF ProjectVector(gfx::Vector2dF source, 143 static gfx::Vector2dF ProjectVector(gfx::Vector2dF source,
144 gfx::Vector2dF destination); 144 gfx::Vector2dF destination);
145 145
146 // Conversion to value. 146 // Conversion to value.
147 static scoped_ptr<base::Value> AsValue(gfx::Size s); 147 static scoped_ptr<base::Value> AsValue(gfx::Size s);
148 static scoped_ptr<base::Value> AsValue(gfx::Rect r);
148 static scoped_ptr<base::Value> AsValue(gfx::PointF q); 149 static scoped_ptr<base::Value> AsValue(gfx::PointF q);
149 static scoped_ptr<base::Value> AsValue(const gfx::QuadF& q); 150 static scoped_ptr<base::Value> AsValue(const gfx::QuadF& q);
150 static scoped_ptr<base::Value> AsValue(const gfx::RectF& rect); 151 static scoped_ptr<base::Value> AsValue(const gfx::RectF& rect);
151 152
152 // Returns a base::Value representation of the floating point value. 153 // Returns a base::Value representation of the floating point value.
153 // If the value is inf, returns max double/float representation. 154 // If the value is inf, returns max double/float representation.
154 static scoped_ptr<base::Value> AsValueSafely(double value); 155 static scoped_ptr<base::Value> AsValueSafely(double value);
155 static scoped_ptr<base::Value> AsValueSafely(float value); 156 static scoped_ptr<base::Value> AsValueSafely(float value);
156 }; 157 };
157 158
158 } // namespace cc 159 } // namespace cc
159 160
160 #endif // CC_BASE_MATH_UTIL_H_ 161 #endif // CC_BASE_MATH_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/base/math_util.cc » ('j') | cc/base/math_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698