diff options
-rw-r--r-- | src/pugixpath.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pugixpath.cpp b/src/pugixpath.cpp index d20baad..2296814 100644 --- a/src/pugixpath.cpp +++ b/src/pugixpath.cpp @@ -444,6 +444,7 @@ namespace double round_nearest_nzero(double value)
{
// same as round_nearest, but returns -0 for [-0.5, -0]
+ // ceil is used to differentiate between +0 and -0 (we return -0 for [-0.5, -0] and +0 for +0)
return (value >= -0.5 && value <= 0) ? ceil(value) : floor(value + 0.5);
}
|