Mercurial > dive4elements > river
changeset 2061:87f9153bb7ca
Fixed order to determine correct step width of Qs and Ws.
flys-artifacts/trunk@3554 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 28 Dec 2011 12:46:56 +0000 |
parents | 3ffb7195173f |
children | ed6c6d437875 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java |
diffstat | 2 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Dec 28 12:39:35 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Dec 28 12:46:56 2011 +0000 @@ -1,3 +1,8 @@ +2011-12-28 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/states/WQSelect.java: Fixed + broken order to determine the step width of Qs and Ws. + 2011-12-28 Ingo Weinzierl <ingo@intevation.de> flys/issue104 (W-INFO: Wasserspiegellagenberechnung / Strecke)
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java Wed Dec 28 12:39:35 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java Wed Dec 28 12:46:56 2011 +0000 @@ -256,14 +256,14 @@ double diff = min < max ? max - min : min - max; double step = diff / MAX_STEPS; - if (step < 1000) { - return getSteps(step, 100); + if (step < 10) { + return getSteps(step, 1); } else if (step < 100) { return getSteps(step, 10); } - else if (step < 10) { - return getSteps(step, 1); + else if (step < 1000) { + return getSteps(step, 100); } else { return step; @@ -275,14 +275,14 @@ double diff = min < max ? max - min : min - max; double step = diff / MAX_STEPS; - if (step < 1000) { - return getSteps(step, 100); + if (step < 10) { + return getSteps(step, 1); } else if (step < 100) { return getSteps(step, 10); } - else if (step < 10) { - return getSteps(step, 1); + else if (step < 1000) { + return getSteps(step, 100); } else { return step;