[Git][NTPsec/ntpsec][wip-ntpq-peers-display] Fixed bug that caused units to change in the incorrect direction.
Ian Bruene
gitlab at mg.gitlab.com
Fri Mar 24 03:19:52 UTC 2017
Ian Bruene pushed to branch wip-ntpq-peers-display at NTPsec / ntpsec
Commits:
e0166434 by Ian Bruene at 2017-03-23T22:19:07-05:00
Fixed bug that caused units to change in the incorrect direction.
- - - - -
1 changed file:
- pylib/util.py
Changes:
=====================================
pylib/util.py
=====================================
--- a/pylib/util.py
+++ b/pylib/util.py
@@ -79,10 +79,10 @@ def scaleforunit(f):
unitsmoved = 0
while abs(f) < 1.0:
f *= 1000.0 # shift up by one unit
- unitsmoved += 1
+ unitsmoved -= 1
while abs(f) >= 1000.0:
f /= 1000.0 # shift down by one unit
- unitsmoved -= 1
+ unitsmoved += 1
return (f, unitsmoved)
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/e01664341b27e292a3667586a979ae1586a7bd93
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170324/05ddae0c/attachment.html>
More information about the vc
mailing list