| 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 #include "cc/base/math_util.h" | 5 #include "cc/base/math_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| 11 #include "base/debug/trace_event_argument.h" | 11 #include "base/trace_event/trace_event_argument.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "ui/gfx/geometry/quad_f.h" | 13 #include "ui/gfx/geometry/quad_f.h" |
| 14 #include "ui/gfx/geometry/rect.h" | 14 #include "ui/gfx/geometry/rect.h" |
| 15 #include "ui/gfx/geometry/rect_conversions.h" | 15 #include "ui/gfx/geometry/rect_conversions.h" |
| 16 #include "ui/gfx/geometry/rect_f.h" | 16 #include "ui/gfx/geometry/rect_f.h" |
| 17 #include "ui/gfx/geometry/vector2d_f.h" | 17 #include "ui/gfx/geometry/vector2d_f.h" |
| 18 #include "ui/gfx/transform.h" | 18 #include "ui/gfx/transform.h" |
| 19 | 19 |
| 20 namespace cc { | 20 namespace cc { |
| 21 | 21 |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 | 861 |
| 862 double MathUtil::AsDoubleSafely(double value) { | 862 double MathUtil::AsDoubleSafely(double value) { |
| 863 return std::min(value, std::numeric_limits<double>::max()); | 863 return std::min(value, std::numeric_limits<double>::max()); |
| 864 } | 864 } |
| 865 | 865 |
| 866 float MathUtil::AsFloatSafely(float value) { | 866 float MathUtil::AsFloatSafely(float value) { |
| 867 return std::min(value, std::numeric_limits<float>::max()); | 867 return std::min(value, std::numeric_limits<float>::max()); |
| 868 } | 868 } |
| 869 | 869 |
| 870 } // namespace cc | 870 } // namespace cc |
| OLD | NEW |