Code style fix, interface rename, custom item getter

This commit is contained in:
paulevsGitch 2021-07-20 00:10:00 +03:00
parent 179ada3296
commit c6afa74529
134 changed files with 3404 additions and 1244 deletions

View file

@ -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;