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

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

Issue 12472028: Part 1 of cc/ directory shuffles: base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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 #include "cc/math_util.h" 5 #include "cc/base/math_util.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "ui/gfx/quad_f.h" 11 #include "ui/gfx/quad_f.h"
12 #include "ui/gfx/rect.h" 12 #include "ui/gfx/rect.h"
13 #include "ui/gfx/rect_conversions.h" 13 #include "ui/gfx/rect_conversions.h"
14 #include "ui/gfx/rect_f.h" 14 #include "ui/gfx/rect_f.h"
15 #include "ui/gfx/transform.h" 15 #include "ui/gfx/transform.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 return scoped_ptr<base::Value>(base::Value::CreateDoubleValue( 413 return scoped_ptr<base::Value>(base::Value::CreateDoubleValue(
414 std::min(value, std::numeric_limits<double>::max()))); 414 std::min(value, std::numeric_limits<double>::max())));
415 } 415 }
416 416
417 scoped_ptr<base::Value> MathUtil::asValueSafely(float value) { 417 scoped_ptr<base::Value> MathUtil::asValueSafely(float value) {
418 return scoped_ptr<base::Value>(base::Value::CreateDoubleValue( 418 return scoped_ptr<base::Value>(base::Value::CreateDoubleValue(
419 std::min(value, std::numeric_limits<float>::max()))); 419 std::min(value, std::numeric_limits<float>::max())));
420 } 420 }
421 421
422 } // namespace cc 422 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/math_util.h ('k') | cc/base/math_util_unittest.cc » ('j') | cc/cc.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698