fix OOBE in NoiseChunkGenerator3D when using low res palette

This commit is contained in:
dfsek
2022-06-15 21:43:02 -07:00
parent 2c44857575
commit 7b23aa796f
2 changed files with 13 additions and 6 deletions

View File

@@ -87,6 +87,10 @@ public final class MathUtil {
return FastMath.min(FastMath.max(in, -1), 1);
}
public static int clamp(int min, int i, int max) {
return FastMath.max(FastMath.min(i, max), min);
}
/**
* Compute the value in a normally distributed data set that has probability p.
*