changeset 8698:5c7b4f4a2e6c

(issue1670) Purge obsolete if-branching.
author Tom Gottfried <tom@intevation.de>
date Mon, 20 Apr 2015 15:31:12 +0200
parents 527e0f4c28c1
children a60a6e7ca24a
files artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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);
         }

http://dive4elements.wald.intevation.org