Mercurial > dive4elements > river
changeset 3012:0330bff1b382
EpsilonComparator: Fixed sign problem in comparison.
flys-artifacts/trunk@4577 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 05 Jun 2012 08:51:46 +0000 |
parents | ab81ffd1343e |
children | ba62c1751f07 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/utils/EpsilonComparator.java |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Mon Jun 04 16:44:56 2012 +0000 +++ b/flys-artifacts/ChangeLog Tue Jun 05 08:51:46 2012 +0000 @@ -1,3 +1,8 @@ +2012-06-05 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/utils/EpsilonComparator.java: + Fixed sign problem in comparison. + 2012-06-04 Sascha L. Teichmann <sascha.teichmann@intevation.de> Implemented outlier checks in fixings analysis. Expected to be
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/EpsilonComparator.java Mon Jun 04 16:44:56 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/EpsilonComparator.java Tue Jun 05 08:51:46 2012 +0000 @@ -29,7 +29,7 @@ @Override public int compare(Double a, Double b) { double diff = value(a) - value(b); - if (diff < epsilon) return -1; + if (diff < -epsilon) return -1; return diff > epsilon ? +1 : 0; } }