diff --git a/src/main/java/com/bergerkiller/bukkit/common/math/OrientedBoundingBox.java b/src/main/java/com/bergerkiller/bukkit/common/math/OrientedBoundingBox.java index e24991b8c..7ae42be24 100644 --- a/src/main/java/com/bergerkiller/bukkit/common/math/OrientedBoundingBox.java +++ b/src/main/java/com/bergerkiller/bukkit/common/math/OrientedBoundingBox.java @@ -216,6 +216,25 @@ public class OrientedBoundingBox { cachedVertices = null; } + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } else if (o instanceof OrientedBoundingBox) { + OrientedBoundingBox other = (OrientedBoundingBox) o; + return this.orientation.equals(other.orientation) && + this.position.equals(other.position) && + this.radius.equals(other.radius); + } else { + return false; + } + } + + @Override + public String toString() { + return "OBB{pos=" + position + ", size=" + radius.clone().multiply(2.0) + ", ori=" + orientation + "}"; + } + /** * Tests whether a point vector is inside this bounding box. Equivalent to testing * {@link #distanceToPoint(Vector)} is inside. diff --git a/src/main/java/com/bergerkiller/bukkit/common/math/Quaternion.java b/src/main/java/com/bergerkiller/bukkit/common/math/Quaternion.java index 805019e5c..525c68a43 100644 --- a/src/main/java/com/bergerkiller/bukkit/common/math/Quaternion.java +++ b/src/main/java/com/bergerkiller/bukkit/common/math/Quaternion.java @@ -507,7 +507,7 @@ public class Quaternion implements Rotatable, Cloneable { @Override public String toString() { - return "{" + this.x + ", " + this.y + ", " + this.z + ", " + this.w + "}"; + return "{x=" + this.x + ", y=" + this.y + ", z=" + this.z + ", w=" + this.w + "}"; } /**