Mercurial > dive4elements > river
changeset 8530:4dd6d89ce95e
(issue1788) Do not divide area by two.
The area calcluation correctly calculates the area of a polygon
to divide it by two breaks that result.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 18 Feb 2015 17:17:20 +0100 |
parents | 4ead7919e709 |
children | a8048aac8831 |
files | artifacts/src/main/java/org/dive4elements/river/jfree/StableXYDifferenceRenderer.java |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/StableXYDifferenceRenderer.java Wed Feb 18 16:57:58 2015 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/jfree/StableXYDifferenceRenderer.java Wed Feb 18 17:17:20 2015 +0100 @@ -1640,7 +1640,7 @@ Object[] l_xValues = x_xValues.toArray(); Object[] l_yValues = x_yValues.toArray(); - double area = calculateArea(l_xValues, l_yValues)/2d; + double area = calculateArea(l_xValues, l_yValues); if (x_positive) positiveArea += area; else negativeArea += area; updateCentroid(l_xValues, l_yValues);