my code:
for (int x = 0; x < pyramidVectors[level].length; x++) {
for (int y = 0; y < pyramidVectors[level].length; y++) {
pyramidVectors[level][x][y] = new PVector(x + (-2* PYRAMID_SIZE) + level, y + (-2* PYRAMID_SIZE) + level, level + (-1 * PYRAMID_SIZE));
if (pyramidVectors[level][x][y].getX() == 0 && pyramidVectors[level][x][y].getY() == 0 && pyramidVectors[level][x][y].getZ() == 0) {
pyramidVectors[level][x][y] = null;
}
}
}
}```
sets `pyramidVectors[level][x][y]` to `null` whenever the loop encounters a `pyramidVectors[level][x][y]` where `level + x` = 6,
however the following code:
```public static void printVectorList() {
for (int level = 0; level < pyramidLevels; level++) {
for (int x = 0; x < pyramidVectors[level].length; x++) {
for (int y = 0; y < pyramidVectors[level].length; y++) {
if (pyramidVectors[level][x][y]!= null) {
System.out.println("["+level+"]"+"["+x+"]"+"["+y+"]\n"+pyramidVectors[level][x][y]);
}
if (pyramidVectors[level][x][y]== null) {
System.out.println("["+level+"]"+"["+x+"]"+"["+y+"]\n(null)");
}
}
}
}
}```
is able to correctly print each vector... what gives?
Attached is the print output of the second function with the format:
```[level][x][y]
(x,y,z)```