Caped Cone SDF

This commit is contained in:
paulevsGitch 2020-09-29 11:43:03 +03:00
parent 257307d93d
commit c638a20ae6
2 changed files with 59 additions and 0 deletions

View file

@ -73,7 +73,15 @@ public class MHelper {
return (float) Math.sqrt(x * x + y * y + z * z);
}
public static float length(float x, float y) {
return (float) Math.sqrt(x * x + y * y);
}
public static float dot(float x1, float y1, float z1, float x2, float y2, float z2) {
return x1 * x2 + y1 * y2 + z1 * z2;
}
public static float dot(float x1, float y1, float x2, float y2) {
return x1 * x2 + y1 * y2;
}
}