round.hpp

Go to the documentation of this file.
00001 
00023 #ifndef __MLPACK_CORE_MATH_ROUND_HPP
00024 #define __MLPACK_CORE_MATH_ROUND_HPP
00025 
00026 // _MSC_VER should only be defined for Visual Studio, which doesn't implement
00027 // C99.
00028 #ifdef _MSC_VER
00029 
00030 // This function ends up going into the global namespace, so it can be used in
00031 // place of C99's round().
00032 
00034 inline double round(double a)
00035 {
00036   return floor(a + 0.5);
00037 }
00038 
00039 #endif
00040 
00041 #endif

Generated on 29 Sep 2016 for MLPACK by  doxygen 1.6.1