Add round method for daisy

round does not exist in MSVC<2012 - added with the same code
as in line_descritor/binary_descriptor.cpp
pull/338/head
Patrick Snape 10 years ago
parent 11124010aa
commit d1695524d2
  1. 13
      modules/xfeatures2d/src/daisy.cpp

@ -53,6 +53,19 @@
#include <fstream>
#include <stdlib.h>
#ifdef _MSC_VER
#if (_MSC_VER <= 1700)
/* 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
namespace cv
{
namespace xfeatures2d

Loading…
Cancel
Save