Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/SieveArray.java @ 4001:ab3a4ad82ae1
S(Q) accumulated same diameter meassurements per bank distance.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Mon, 01 Oct 2012 14:03:13 +0200 |
parents | a9c93b7c9da1 |
children | 3b79e8afca7e |
comparison
equal
deleted
inserted
replaced
4000:92719f122c77 | 4001:ab3a4ad82ae1 |
---|---|
40 } | 40 } |
41 | 41 |
42 public void calculateNormLoads() { | 42 public void calculateNormLoads() { |
43 double total = totalLoad(); | 43 double total = totalLoad(); |
44 if (Math.abs(total) < EPSILON) { | 44 if (Math.abs(total) < EPSILON) { |
45 System.arraycopy(loads, 0, normLoads, 0, loads.length); | |
45 return; | 46 return; |
46 } | 47 } |
47 total = 1d/total; | 48 total = 1d/total; |
48 for (int i = 0; i < normLoads.length; ++i) { | 49 for (int i = 0; i < normLoads.length; ++i) { |
49 normLoads[i] = total*loads[i]; | 50 normLoads[i] = total*loads[i]; |