3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 02:50:06 +01:00

Fix off by one error when calculating Poly2D region dimensions.

Dieser Commit ist enthalten in:
Wizjany 2012-12-05 18:31:08 -05:00
Ursprung ab693a7521
Commit 3f1a2bfc39

Datei anzeigen

@ -250,7 +250,7 @@ public class Polygonal2DRegion extends AbstractRegion implements FlatRegion {
* @return width * @return width
*/ */
public int getWidth() { public int getWidth() {
return max.getBlockX() - min.getBlockX(); return max.getBlockX() - min.getBlockX() + 1;
} }
/** /**
@ -259,7 +259,7 @@ public class Polygonal2DRegion extends AbstractRegion implements FlatRegion {
* @return height * @return height
*/ */
public int getHeight() { public int getHeight() {
return maxY - minY; return maxY - minY + 1;
} }
/** /**
@ -268,7 +268,7 @@ public class Polygonal2DRegion extends AbstractRegion implements FlatRegion {
* @return length * @return length
*/ */
public int getLength() { public int getLength() {
return max.getBlockZ() - min.getBlockZ(); return max.getBlockZ() - min.getBlockZ() + 1;
} }
/** /**