diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java @ 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 7137ef65c17c
children aa64fe4df8ab
line wrap: on
line diff
--- 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