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

Side by Side Diff: base/float_util.h

Issue 1076443002: Removed obsolete float_util.h as VS2013 supports standards well enough. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fixed mistake in value converter. Created 5 years, 8 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
« no previous file with comments | « base/base.gypi ('k') | base/json/json_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_FLOAT_UTIL_H_
6 #define BASE_FLOAT_UTIL_H_
7
8 #include "build/build_config.h"
9
10 #include <float.h>
11
12 #include <cmath>
13
14 namespace base {
15
16 template <typename Float>
17 inline bool IsFinite(const Float& number) {
18 #if defined(OS_POSIX)
19 return std::isfinite(number) != 0;
20 #elif defined(OS_WIN)
21 return _finite(number) != 0;
22 #endif
23 }
24
25 template <typename Float>
26 inline bool IsNaN(const Float& number) {
27 #if defined(OS_POSIX)
28 return std::isnan(number) != 0;
29 #elif defined(OS_WIN)
30 return _isnan(number) != 0;
31 #endif
32 }
33
34 } // namespace base
35
36 #endif // BASE_FLOAT_UTIL_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/json/json_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698