bugfix in array loading

This commit is contained in:
2023-09-11 14:06:22 -04:00
parent cf1547d077
commit dd5fc323ef
+6 -6
View File
@@ -137,10 +137,10 @@ public class HeightMap {
this.bucketWidthX = halfExtentsX;
this.bucketWidthY = halfExtentsY;
this.pixelColorValues = new int[this.fullExtentsX + 1][this.fullExtentsY + 1];
this.pixelColorValues = new int[this.fullExtentsX][this.fullExtentsY];
for (int y = 0; y <= this.fullExtentsY; y++) {
for (int x = 0; x <= this.fullExtentsX; x++) {
for (int y = 0; y < this.fullExtentsY; y++) {
for (int x = 0; x < this.fullExtentsX; x++) {
pixelColorValues[x][y] = 0;
}
}
@@ -172,10 +172,10 @@ public class HeightMap {
this.bucketWidthX = halfExtentsX;
this.bucketWidthY = halfExtentsY;
this.pixelColorValues = new int[this.fullExtentsX + 1][this.fullExtentsY + 1];
this.pixelColorValues = new int[this.fullExtentsX][this.fullExtentsY];
for (int y = 0; y <= this.fullExtentsY; y++) {
for (int x = 0; x <= this.fullExtentsX; x++) {
for (int y = 0; y < this.fullExtentsY; y++) {
for (int x = 0; x < this.fullExtentsX; x++) {
pixelColorValues[x][y] = 0;
}
}