changeset 459:fadf797bf123

Increment kms array size by one to take the end of range, too. flys-artifacts/trunk@1962 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 19 May 2011 14:51:53 +0000
parents 523a256451cd
children 38341dcab513
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu May 19 14:38:15 2011 +0000
+++ b/flys-artifacts/ChangeLog	Thu May 19 14:51:53 2011 +0000
@@ -1,3 +1,8 @@
+2011-05-19	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java (getExplodedValues):
+	  Increment kms array size by one to take the end of range, too.
+
 2011-05-19	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/WstValueTableFactory.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Thu May 19 14:38:15 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Thu May 19 14:51:53 2011 +0000
@@ -916,9 +916,9 @@
 
         double diff = to - from;
         double tmp  = diff / step;
-        int    num = (int) Math.ceil(tmp) ;
+        int    num = (int)Math.abs(Math.ceil(tmp)) + 1;
 
-        double[] values = new double[num];
+        double [] values = new double[num];
 
         for (int idx = 0; idx < num; idx++) {
             values[idx] = lower;

http://dive4elements.wald.intevation.org