mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-10 17:56:03 +00:00
ignore out of bounds values in RandomLocator
This commit is contained in:
@@ -41,7 +41,9 @@ public class RandomLocator implements Locator {
|
||||
|
||||
BinaryColumn results = new BinaryColumn(column.getMinY(), column.getMaxY());
|
||||
for(int i = 0; i < size; i++) {
|
||||
results.set(height.get(r));
|
||||
int h = height.get(r);
|
||||
if(h >= column.getMaxY() || h < column.getMinY()) continue;
|
||||
results.set(h);
|
||||
}
|
||||
|
||||
return results;
|
||||
|
||||
Reference in New Issue
Block a user