Commit 8e24552f authored by Alexander Stohr's avatar Alexander Stohr

make sources compile again on MSVC 2012 (VC 11) by adding round()

parent 865346fd
......@@ -41,6 +41,19 @@
#include "precomp.hpp"
#ifdef _MSC_VER
#if (__cplusplus <= 199711L)
/* This function rounds x to the nearest integer, but rounds halfway cases away from zero. */
static inline double round(double x)
{
if (x < 0.0)
return ceil(x - 0.5);
else
return floor(x + 0.5);
}
#endif
#endif
#define NUM_OF_BANDS 9
#define Horizontal 255//if |dx|<|dy|;
#define Vertical 0//if |dy|<=|dx|;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment