round.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_CORE_MATH_ROUND_HPP
14 #define MLPACK_CORE_MATH_ROUND_HPP
15 
16 // _MSC_VER should only be defined for Visual Studio, which doesn't implement
17 // C99.
18 #ifdef _MSC_VER
19 
20 // This function ends up going into the global namespace, so it can be used in
21 // place of C99's round().
22 
24 inline double round(double a)
25 {
26  return floor(a + 0.5);
27 }
28 
29 #endif
30 
31 #endif