[Dive4elements-commits] [PATCH 1 of 7] Changed naming of variables (i & j -> i & k) for readability
Wald Commits
scm-commit at wald.intevation.org
Wed Dec 19 11:36:27 CET 2012
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1355913351 -3600
# Node ID 115afdaf3e852fc0337c1f9d23f1d0fb0c3ad7a3
# Parent 38ec171544de0fb61d3ae335a0171a785a87597d
Changed naming of variables (i & j -> i & k) for readability.
diff -r 38ec171544de -r 115afdaf3e85 flys-artifacts/src/main/java/de/intevation/flys/jfree/StableXYDifferenceRenderer.java
--- 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?
}
More information about the Dive4elements-commits
mailing list