13 #define _USE_MATH_DEFINES // (For VS to define M_PI, etc. in cmath) 29 __m128d
t = _mm_set_sd(
value );
30 return _mm_cvtsd_si32(
t);
31 #elif (defined WIN32 || defined _WIN32) && !defined WIN64 && !defined _WIN64 && defined _MSC_VER 39 #elif defined HAVE_LRINT || defined __GNUC__ 40 return static_cast<int>(lrint(
value));
42 return static_cast<int>(
value + 0.5);
50 #if MRPT_HAS_SSE2 && MRPT_WORD_SIZE==64 51 __m128d
t = _mm_set_sd(
value );
52 return _mm_cvtsd_si64(
t);
53 #elif (defined WIN32 || defined _WIN32) && !defined WIN64 && !defined _WIN64 && defined _MSC_VER 61 #elif defined HAVE_LRINT || defined __GNUC__ 64 return static_cast<long>(
value + 0.5);
74 long double F = ::pow((
long double)10.0,-(
long double)power10);
long round_long(const T value)
Returns the closer integer (long) to x.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
T round_10power(T val, int power10)
Round a decimal number up to the given 10'th power (eg, to 1000,100,10, and also fractions) power10 m...
int round(const T value)
Returns the closer integer (int) to x.
GLsizei const GLfloat * value