1 #ifndef MSVC_ROUND_FIX
2 #define MSVC_ROUND_FIX
3 /**
4  * This helper function exists only because MS VC++ 2010 does not support round() in
5  * <cmath>. round() works with g++ and clang++ but is formally a C++11 extension.
6  * So this file exists for MS VC++ only.
7  */
round(double val)8 inline double round(double val)
9 {
10     return floor(val + 0.5);
11 }
12 
13 #endif /* MSVC_ROUND_FIX */
14