Revert "Make DeleteCache() recursive"
[chromium-blink-merge.git] / base / float_util.h
blob458e85965b29657bf4044837c4cd1c88263d5d98
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.
5 #ifndef BASE_FLOAT_UTIL_H_
6 #define BASE_FLOAT_UTIL_H_
8 #include "build/build_config.h"
10 #include <float.h>
12 #include <cmath>
14 namespace base {
16 inline bool IsFinite(const double& number) {
17 #if defined(OS_POSIX)
18 return std::isfinite(number) != 0;
19 #elif defined(OS_WIN)
20 return _finite(number) != 0;
21 #endif
24 } // namespace base
26 #endif // BASE_FLOAT_UTIL_H_