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