Properly scale the random in SimpleRandomCollection (#2220)

This commit is contained in:
Hannes Greule 2023-05-12 23:13:35 +02:00 committed by GitHub
parent c57fee5b86
commit 71bac009db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ public class SimpleRandomCollection<E> extends RandomCollection<E> {
@Override
public E next(int x, int y, int z) {
return map.ceilingEntry(getRandom().nextDouble(x, y, z)).getValue();
return map.ceilingEntry(getRandom().nextDouble(x, y, z) * this.total).getValue();
}
}