| OLD | NEW |
| 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 <algorithm> | 8 #include <algorithm> |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 | 10 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 static void AddToTracedValue(const gfx::SizeF& s, | 188 static void AddToTracedValue(const gfx::SizeF& s, |
| 189 base::debug::TracedValue* res); | 189 base::debug::TracedValue* res); |
| 190 static void AddToTracedValue(const gfx::Rect& r, | 190 static void AddToTracedValue(const gfx::Rect& r, |
| 191 base::debug::TracedValue* res); | 191 base::debug::TracedValue* res); |
| 192 static void AddToTracedValue(const gfx::PointF& q, | 192 static void AddToTracedValue(const gfx::PointF& q, |
| 193 base::debug::TracedValue* res); | 193 base::debug::TracedValue* res); |
| 194 static void AddToTracedValue(const gfx::Point3F&, | 194 static void AddToTracedValue(const gfx::Point3F&, |
| 195 base::debug::TracedValue* res); | 195 base::debug::TracedValue* res); |
| 196 static void AddToTracedValue(const gfx::Vector2d& v, | 196 static void AddToTracedValue(const gfx::Vector2d& v, |
| 197 base::debug::TracedValue* res); | 197 base::debug::TracedValue* res); |
| 198 static void AddToTracedValue(const gfx::Vector2dF& v, |
| 199 base::debug::TracedValue* res); |
| 198 static void AddToTracedValue(const gfx::QuadF& q, | 200 static void AddToTracedValue(const gfx::QuadF& q, |
| 199 base::debug::TracedValue* res); | 201 base::debug::TracedValue* res); |
| 200 static void AddToTracedValue(const gfx::RectF& rect, | 202 static void AddToTracedValue(const gfx::RectF& rect, |
| 201 base::debug::TracedValue* res); | 203 base::debug::TracedValue* res); |
| 202 static void AddToTracedValue(const gfx::Transform& transform, | 204 static void AddToTracedValue(const gfx::Transform& transform, |
| 203 base::debug::TracedValue* res); | 205 base::debug::TracedValue* res); |
| 204 static void AddToTracedValue(const gfx::BoxF& box, | 206 static void AddToTracedValue(const gfx::BoxF& box, |
| 205 base::debug::TracedValue* res); | 207 base::debug::TracedValue* res); |
| 206 | 208 |
| 207 // Returns a base::Value representation of the floating point value. | 209 // Returns a base::Value representation of the floating point value. |
| 208 // If the value is inf, returns max double/float representation. | 210 // If the value is inf, returns max double/float representation. |
| 209 static double AsDoubleSafely(double value); | 211 static double AsDoubleSafely(double value); |
| 210 static float AsFloatSafely(float value); | 212 static float AsFloatSafely(float value); |
| 211 }; | 213 }; |
| 212 | 214 |
| 213 } // namespace cc | 215 } // namespace cc |
| 214 | 216 |
| 215 #endif // CC_BASE_MATH_UTIL_H_ | 217 #endif // CC_BASE_MATH_UTIL_H_ |
| OLD | NEW |