diff --git a/include/XPath/impl/xpath_object.hpp b/include/XPath/impl/xpath_object.hpp index 7ed446b3..e0ab41e7 100644 --- a/include/XPath/impl/xpath_object.hpp +++ b/include/XPath/impl/xpath_object.hpp @@ -407,10 +407,12 @@ namespace impl inline double roundNumber(double value) { if(!(isNaN(value) || isInfinite(value) || (std::fabs(value) == 0))) + { if((value < 0.0) && (value > -0.5)) value = -0.0; else value = std::floor(value + 0.5); + } // if ... return value; } // roundNumber