This commit is contained in:
Ondřej Hruška
2014-04-26 01:57:29 +02:00
parent 5235b969c9
commit 84ef9fb9fe
23 changed files with 339 additions and 38 deletions
@@ -0,0 +1,29 @@
package mightypork.util.error;
public class YouFuckedUpException extends RuntimeException {
public YouFuckedUpException()
{
super();
}
public YouFuckedUpException(String message, Throwable cause)
{
super(message, cause);
}
public YouFuckedUpException(String message)
{
super(message);
}
public YouFuckedUpException(Throwable cause)
{
super(cause);
}
}
+6
View File
@@ -656,4 +656,10 @@ public class Calc {
{
if (!inRange(index, 0, length - 1)) { throw new IndexOutOfBoundsException(); }
}
public static double dist(double x1, double y1, double x2, double y2)
{
return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));
}
}