Code style fix, interface rename, custom item getter
This commit is contained in:
parent
179ada3296
commit
c6afa74529
134 changed files with 3404 additions and 1244 deletions
|
@ -34,7 +34,10 @@ public class SDFRadialNoiseMap extends SDFDisplacement {
|
|||
}
|
||||
|
||||
private float getNoise(double x, double z) {
|
||||
return (float) noise.eval(x, z) + (float) noise.eval(x * 3 + 1000, z * 3) * 0.5F + (float) noise.eval(x * 9 + 1000, z * 9) * 0.2F;
|
||||
return (float) noise.eval(x, z) + (float) noise.eval(
|
||||
x * 3 + 1000,
|
||||
z * 3
|
||||
) * 0.5F + (float) noise.eval(x * 9 + 1000, z * 9) * 0.2F;
|
||||
}
|
||||
|
||||
public SDFRadialNoiseMap setSeed(long seed) {
|
||||
|
|
|
@ -30,7 +30,11 @@ public class SDFCappedCone extends SDFPrimitive {
|
|||
float k2y = 2 * height;
|
||||
float cax = qx - MHelper.min(qx, (y < 0F) ? radius1 : radius2);
|
||||
float cay = Math.abs(y) - height;
|
||||
float mlt = Mth.clamp(MHelper.dot(radius2 - qx, height - y, k2x, k2y) / MHelper.dot(k2x, k2y, k2x, k2y), 0F, 1F);
|
||||
float mlt = Mth.clamp(
|
||||
MHelper.dot(radius2 - qx, height - y, k2x, k2y) / MHelper.dot(k2x, k2y, k2x, k2y),
|
||||
0F,
|
||||
1F
|
||||
);
|
||||
float cbx = qx - radius2 + k2x * mlt;
|
||||
float cby = y - height + k2y * mlt;
|
||||
float s = (cbx < 0F && cay < 0F) ? -1F : 1F;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue