0 Members and 1 Guest are viewing this topic.

In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader

longestLength = Math.max((float) Math.sqrt(Math.pow(x3 - x4, 2) + Math.pow(y3 - y4, 2) + Math.pow(z3 - z4, 2)), Math.max((float) Math.sqrt(Math.pow(x2 - x4, 2) + Math.pow(y2 - y4, 2) + Math.pow(z2 - z4, 2)), Math.max((float) Math.sqrt(Math.pow(x2 - x3, 2) + Math.pow(y2 - y3, 2) + Math.pow(z2 - z3, 2)), Math.max((float) Math.sqrt(Math.pow(x1 - x4, 2) + Math.pow(y1 - y4, 2) + Math.pow(z1 - z4, 2)), Math.max((float) Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2) + Math.pow(z1 - z2, 2)), (float) Math.sqrt(Math.pow(x1 - x3, 2) + Math.pow(y1 - y3, 2) + Math.pow(z1 - z3, 2)))))));

lolz math sucks Code: [Select] longestLength = Math.max((float) Math.sqrt(Math.pow(x3 - x4, 2) + Math.pow(y3 - y4, 2) + Math.pow(z3 - z4, 2)), Math.max((float) Math.sqrt(Math.pow(x2 - x4, 2) + Math.pow(y2 - y4, 2) + Math.pow(z2 - z4, 2)), Math.max((float) Math.sqrt(Math.pow(x2 - x3, 2) + Math.pow(y2 - y3, 2) + Math.pow(z2 - z3, 2)), Math.max((float) Math.sqrt(Math.pow(x1 - x4, 2) + Math.pow(y1 - y4, 2) + Math.pow(z1 - z4, 2)), Math.max((float) Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2) + Math.pow(z1 - z2, 2)), (float) Math.sqrt(Math.pow(x1 - x3, 2) + Math.pow(y1 - y3, 2) + Math.pow(z1 - z3, 2)))))));(This is one line broken into 6 for readability, it finds the longest of all lines connecting 4 vertices of a quad.)

double distance(float x0, float y0, float z0, float x1, float y1, float z1){ float x = x0 - x1; float y = y0 - y1; float z = z0 - z1; return Math.sqrt(x*x + y*y + z*z);}double max(double... values){ // Java 8 return Arrays.stream(values).max().getAsDouble(); // Java <= 7 double max = Double.MIN_VALUE; for (double d : values) max = Math.max(d); return max;}(...) longestLength = (float) max ( distance(x1, y1, z1, x2, y2, z2), distance(x2, y2, z2, x3, y3, z3), distance(x3, y3, z3, x4, y4, z4), distance(x4, y4, z4, x1, y1, z1), );(...)

java -Djava.library.path="natives" -jar 3D.jar

Ok so, i want some volunteers to do some boring testing So here's what to do: download the attachment, extract the zip, and double click on run.bat. The program should start! Don't touch any of the controls yet except the mouse yet! Your player should be falling down. You will either land on the pink thing or fall right through it. It will be nice if you could reply saying whether you fall through or land on it, as well as a copy of the output.txt file that should be created in the folder in which you extracted the zip. Sorry, so far its windows only

Error: Unable to access jarfile 3dtest.jarPress any key to continue . . .

Error: A JNI error has occurred, please check your installation and try againException in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.privateGetMethodRecursive(Unknown Source) at java.lang.Class.getMethod0(Unknown Source) at java.lang.Class.getMethod(Unknown Source) at sun.launcher.LauncherHelper.validateMainClass(Unknown Source) at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)Caused by: java.lang.ClassNotFoundException: org.lwjgl.LWJGLException at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 7 morePress any key to continue . . .

FacebookandTwitterFollow @Codewalr_us