Mercurial > dive4elements > river
changeset 4704:115afdaf3e85
Changed naming of variables (i & j -> i & k) for readability.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 19 Dec 2012 11:35:51 +0100 |
parents | 38ec171544de |
children | 3199dbc20e22 |
files | flys-artifacts/src/main/java/de/intevation/flys/jfree/StableXYDifferenceRenderer.java |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/StableXYDifferenceRenderer.java Tue Dec 18 15:46:36 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/StableXYDifferenceRenderer.java Wed Dec 19 11:35:51 2012 +0100 @@ -1587,14 +1587,14 @@ double area = 0d; for (int i = 0, N = xValues.length; i < N; ++i) { - int j = (i + 1) % N; + int k = (i + 1) % N; double xi = ((Double)xValues[i]).doubleValue(); double yi = ((Double)yValues[i]).doubleValue(); - double xj = ((Double)xValues[j]).doubleValue(); - double yj = ((Double)yValues[j]).doubleValue(); + double xk = ((Double)xValues[k]).doubleValue(); + double yk = ((Double)yValues[k]).doubleValue(); - area += xi*yj; - area -= xj*yi; + area += xi*yk; + area -= xk*yi; // TODO centroid calculation here? }