comparison flys-artifacts/src/main/java/de/intevation/flys/utils/DoubleUtil.java @ 4183:1755a1bfe5ce

Merged
author Christian Lins <christian.lins@intevation.de>
date Fri, 19 Oct 2012 09:20:52 +0200
parents 6d8c7a00e74e
children 64528d2a89c4
comparison
equal deleted inserted replaced
4182:ad2489b595d7 4183:1755a1bfe5ce
40 double lower = from; 40 double lower = from;
41 41
42 double diff = to - from; 42 double diff = to - from;
43 double tmp = diff / step; 43 double tmp = diff / step;
44 int num = (int)Math.abs(Math.ceil(tmp)) + 1; 44 int num = (int)Math.abs(Math.ceil(tmp)) + 1;
45
46 if (num < 1) {
47 return new double[0];
48 }
45 49
46 double [] values = new double[num]; 50 double [] values = new double[num];
47 51
48 if (from > to) { 52 if (from > to) {
49 step = -step; 53 step = -step;

http://dive4elements.wald.intevation.org