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

Side by Side Diff: third_party/WebKit/Source/platform/geometry/GeometryTestHelpers.cpp

Issue 2940933003: DO NOT SUBMIT results of new clang-format (Closed)
Patch Set: Created 3 years, 6 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "platform/geometry/GeometryTestHelpers.h" 5 #include "platform/geometry/GeometryTestHelpers.h"
6 6
7 #include <math.h>
7 #include <limits> 8 #include <limits>
8 #include <math.h>
9 9
10 namespace blink { 10 namespace blink {
11 namespace GeometryTest { 11 namespace GeometryTest {
12 12
13 bool ApproximatelyEqual(float a, float b, float test_epsilon) { 13 bool ApproximatelyEqual(float a, float b, float test_epsilon) {
14 float abs_a = ::fabs(a); 14 float abs_a = ::fabs(a);
15 float abs_b = ::fabs(b); 15 float abs_b = ::fabs(b);
16 float abs_err = ::fabs(a - b); 16 float abs_err = ::fabs(a - b);
17 if (a == b) 17 if (a == b)
18 return true; 18 return true;
(...skipping 16 matching lines...) Expand all
35 << std::endl 35 << std::endl
36 << "Expected Approx:" << expected_expr << std::endl 36 << "Expected Approx:" << expected_expr << std::endl
37 << " Which is:" << ::testing::PrintToString(expected); 37 << " Which is:" << ::testing::PrintToString(expected);
38 } 38 }
39 39
40 return ::testing::AssertionSuccess(); 40 return ::testing::AssertionSuccess();
41 } 41 }
42 42
43 } // namespace GeometryTest 43 } // namespace GeometryTest
44 } // namespace blink 44 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698