Removed code redundancy
This commit is contained in:
parent
4f1eb423ea
commit
bbc30c1863
|
@ -154,7 +154,7 @@ public class ProtectedPolygonalRegion extends ProtectedRegion {
|
|||
p2 = points.get(s);
|
||||
|
||||
// Do the math, then reassign s
|
||||
area += ((p2.getBlockX() + .5) + (p1.getBlockX() + .5)) * ((p2.getBlockZ() + .5) - (p1.getBlockZ() + .5));
|
||||
area += (p2.getBlockX() + p1.getBlockX() + 1) * (p2.getBlockZ() - p1.getBlockZ());
|
||||
s = i;
|
||||
}
|
||||
return (int) Math.abs(Math.ceil(area / 2D) * yLength);
|
||||
|
|
Loading…
Reference in New Issue