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 <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::PointF q); | 148 static scoped_ptr<base::Value> AsValue(gfx::PointF q); |
149 static scoped_ptr<base::Value> AsValue(gfx::QuadF q); | 149 static scoped_ptr<base::Value> AsValue(gfx::QuadF q); |
150 | 150 |
151 // Returns a base::Value representation of the floating point value. | 151 // Returns a base::Value representation of the floating point value. |
152 // If the value is inf, returns max double/float representation. | 152 // If the value is inf, returns max double/float representation. |
153 static scoped_ptr<base::Value> AsValueSafely(double value); | 153 static scoped_ptr<base::Value> AsValueSafely(double value); |
154 static scoped_ptr<base::Value> AsValueSafely(float value); | 154 static scoped_ptr<base::Value> AsValueSafely(float value); |
155 | |
156 }; | 155 }; |
157 | 156 |
158 } // namespace cc | 157 } // namespace cc |
159 | 158 |
160 #endif // CC_BASE_MATH_UTIL_H_ | 159 #endif // CC_BASE_MATH_UTIL_H_ |
OLD | NEW |