| 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 #include <vector> | 10 #include <vector> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class Value; | 23 class Value; |
| 24 namespace trace_event { | 24 namespace trace_event { |
| 25 class TracedValue; | 25 class TracedValue; |
| 26 } | 26 } |
| 27 } // namespace base | 27 } // namespace base |
| 28 | 28 |
| 29 namespace gfx { | 29 namespace gfx { |
| 30 class QuadF; | 30 class QuadF; |
| 31 class Rect; | 31 class Rect; |
| 32 class RectF; | 32 class RectF; |
| 33 class SizeF; |
| 33 class Transform; | 34 class Transform; |
| 34 class Vector2dF; | 35 class Vector2dF; |
| 35 class Vector2d; | 36 class Vector2d; |
| 36 class Vector3dF; | 37 class Vector3dF; |
| 37 } | 38 } |
| 38 | 39 |
| 39 namespace cc { | 40 namespace cc { |
| 40 | 41 |
| 41 struct HomogeneousCoordinate { | 42 struct HomogeneousCoordinate { |
| 42 HomogeneousCoordinate(SkMScalar x, SkMScalar y, SkMScalar z, SkMScalar w) { | 43 HomogeneousCoordinate(SkMScalar x, SkMScalar y, SkMScalar z, SkMScalar w) { |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 template <typename T> | 316 template <typename T> |
| 316 static T RoundDownInternal(T n, T mul) { | 317 static T RoundDownInternal(T n, T mul) { |
| 317 return (n > 0) ? (n / mul) * mul : (n == 0) ? 0 | 318 return (n > 0) ? (n / mul) * mul : (n == 0) ? 0 |
| 318 : ((n - mul + 1) / mul) * mul; | 319 : ((n - mul + 1) / mul) * mul; |
| 319 } | 320 } |
| 320 }; | 321 }; |
| 321 | 322 |
| 322 } // namespace cc | 323 } // namespace cc |
| 323 | 324 |
| 324 #endif // CC_BASE_MATH_UTIL_H_ | 325 #endif // CC_BASE_MATH_UTIL_H_ |
| OLD | NEW |