changeset 1422:91001e2bb96a

Avoid displaying negative zero
author Chris Cannam
date Thu, 31 Aug 2017 18:45:17 +0100
parents a533662c17f4
children 04ce84f21af3
files base/ScaleTickIntervals.h
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/base/ScaleTickIntervals.h	Mon Jul 10 14:23:19 2017 +0100
+++ b/base/ScaleTickIntervals.h	Thu Aug 31 18:45:17 2017 +0100
@@ -247,6 +247,9 @@
     }
     
     static Tick makeTick(Display display, int precision, double value) {
+        if (value == -0.0) {
+            value = 0.0;
+        }
         const int buflen = 40;
         char buffer[buflen];
         snprintf(buffer, buflen,