[PATCH 2 of 3] (issue1670) Purge obsolete if-branching
Wald Commits
scm-commit at wald.intevation.org
Mon Apr 20 15:33:22 CEST 2015
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1429536672 -7200
# Node ID 5c7b4f4a2e6c44f031d13341fef0def50a22c48c
# Parent 527e0f4c28c109a888e62fa3706b153e3893ad36
(issue1670) Purge obsolete if-branching.
diff -r 527e0f4c28c1 -r 5c7b4f4a2e6c artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java Mon Apr 20 15:03:02 2015 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java Mon Apr 20 15:31:12 2015 +0200
@@ -61,11 +61,10 @@
(Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) {
continue;
}
- // Create gap if distance >= distance.
- if (i != 0 && Math.abs(xPoints[i-1] - xPoints[i]) >= distance) {
- if (!Double.isNaN(yPoints[i-1]) && !Double.isNaN(yPoints[i])) {
- series.add((xPoints[i-1]+xPoints[i])/2.d, Double.NaN, false);
- }
+ // Create gap if distance between points > distance.
+ if (i > 0 && Math.abs(xPoints[i-1] - xPoints[i]) > distance &&
+ !Double.isNaN(yPoints[i-1]) && !Double.isNaN(yPoints[i])) {
+ series.add((xPoints[i-1] + xPoints[i])/2, Double.NaN, false);
}
series.add(xPoints[i], yPoints[i], false);
}
More information about the Dive4Elements-commits
mailing list