diff artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthUtils.java @ 9503:83e6acdf8fc6

Fixed: no rounding during calculations (Meilenstein-2 2.9)
author mschaefer
date Fri, 28 Sep 2018 10:11:06 +0200
parents 8ae7137b67d7
children
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthUtils.java	Fri Sep 28 10:02:28 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthUtils.java	Fri Sep 28 10:11:06 2018 +0200
@@ -10,7 +10,6 @@
 package org.dive4elements.river.artifacts.sinfo.flowdepth;
 
 import org.dive4elements.river.artifacts.model.Calculation;
-import org.dive4elements.river.utils.Formatter;
 
 /**
  * @author Gernot Belger
@@ -58,11 +57,11 @@
     }
 
     /**
-     * Calculates a flow depth, rounded to the active scale
+     * Calculates a flow depth
      */
     public static double calcFlowDepth(final double wst, final double bedHeight) {
         if (Double.isNaN(wst) || Double.isInfinite(wst) || Double.isNaN(bedHeight) || Double.isInfinite(bedHeight))
             return Math.max(wst - bedHeight, 0.0);
-        return Math.max(Formatter.roundFlowDepth(wst).subtract(Formatter.roundFlowDepth(bedHeight)).doubleValue(), 0.0);
+        return Math.max(wst - bedHeight, 0.0);
     }
 }
\ No newline at end of file

http://dive4elements.wald.intevation.org