Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixFacetUtils.java @ 3416:f14206b4b688
Small optimization.
flys-artifacts/trunk@5069 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 19 Jul 2012 15:20:51 +0000 |
parents | d7b0f52d6d04 |
children |
comparison
equal
deleted
inserted
replaced
3415:e3c7a3228bc2 | 3416:f14206b4b688 |
---|---|
2 | 2 |
3 import de.intevation.flys.artifacts.model.Parameters; | 3 import de.intevation.flys.artifacts.model.Parameters; |
4 | 4 |
5 public final class FixFacetUtils { | 5 public final class FixFacetUtils { |
6 | 6 |
7 public static final String [] MAX_Q_COLUMN = { "max_q" }; | |
8 | |
7 public static double getMaxQ(Parameters params, double km) { | 9 public static double getMaxQ(Parameters params, double km) { |
8 double [] maxQ = params.interpolate("km", km, new String[] { "max_q" }); | 10 double [] maxQ = params.interpolate("km", km, MAX_Q_COLUMN); |
9 if (maxQ == null) { | 11 if (maxQ == null) { |
10 return 1000d; | 12 return 1000d; |
11 } | 13 } |
12 double mQ = Math.min(10000d, Math.abs(maxQ[0])); | 14 double mQ = Math.min(10000d, Math.abs(maxQ[0])); |
13 return mQ + 0.05*mQ; | 15 return mQ + 0.05*mQ; |