diff options
3 files changed, 5 insertions, 3 deletions
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/Vector2.java b/ardor3d-math/src/main/java/com/ardor3d/math/Vector2.java index c881f64..e73939f 100644 --- a/ardor3d-math/src/main/java/com/ardor3d/math/Vector2.java +++ b/ardor3d-math/src/main/java/com/ardor3d/math/Vector2.java @@ -975,7 +975,7 @@ public class Vector2 implements Cloneable, Savable, Externalizable, ReadOnlyVect return false; } final ReadOnlyVector2 comp = (ReadOnlyVector2) o; - return getX() == comp.getX() && getY() == comp.getY(); + return Double.compare(getX(), comp.getX()) == 0 && Double.compare(getY(), comp.getY()) == 0; } // ///////////////// diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/Vector3.java b/ardor3d-math/src/main/java/com/ardor3d/math/Vector3.java index 8c67591..7fe00c2 100644 --- a/ardor3d-math/src/main/java/com/ardor3d/math/Vector3.java +++ b/ardor3d-math/src/main/java/com/ardor3d/math/Vector3.java @@ -1090,7 +1090,8 @@ public class Vector3 implements Cloneable, Savable, Externalizable, ReadOnlyVect return false; } final ReadOnlyVector3 comp = (ReadOnlyVector3) o; - return getX() == comp.getX() && getY() == comp.getY() && getZ() == comp.getZ(); + return Double.compare(getX(), comp.getX()) == 0 && Double.compare(getY(), comp.getY()) == 0 + && Double.compare(getZ(), comp.getZ()) == 0; } // ///////////////// diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/Vector4.java b/ardor3d-math/src/main/java/com/ardor3d/math/Vector4.java index 2c64746..58a0541 100644 --- a/ardor3d-math/src/main/java/com/ardor3d/math/Vector4.java +++ b/ardor3d-math/src/main/java/com/ardor3d/math/Vector4.java @@ -1057,7 +1057,8 @@ public class Vector4 implements Cloneable, Savable, Externalizable, ReadOnlyVect return false; } final ReadOnlyVector4 comp = (ReadOnlyVector4) o; - return getX() == comp.getX() && getY() == comp.getY() && getZ() == comp.getZ() && getW() == comp.getW(); + return Double.compare(getX(), comp.getX()) == 0 && Double.compare(getY(), comp.getY()) == 0 + && Double.compare(getZ(), comp.getZ()) == 0 && Double.compare(getW(), comp.getW()) == 0; } // ///////////////// |