Properly scale the random in SimpleRandomCollection (#2220)
This commit is contained in:
@ -36,7 +36,7 @@ public class SimpleRandomCollection<E> extends RandomCollection<E> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public E next(int x, int y, int z) {
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user