MLPACK  1.0.8
round.hpp
Go to the documentation of this file.
1 
23 #ifndef __MLPACK_CORE_MATH_ROUND_HPP
24 #define __MLPACK_CORE_MATH_ROUND_HPP
25 
26 // _MSC_VER should only be defined for Visual Studio, which doesn't implement
27 // C99.
28 #ifdef _MSC_VER
29 
30 // This function ends up going into the global namespace, so it can be used in
31 // place of C99's round().
32 
34 inline double round(double a)
35 {
36  return floor(a + 0.5);
37 }
38 
39 #endif
40 
41 #endif