summaryrefslogtreecommitdiffstats
path: root/src/javax/vecmath/Tuple2d.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/javax/vecmath/Tuple2d.java')
-rw-r--r--src/javax/vecmath/Tuple2d.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/javax/vecmath/Tuple2d.java b/src/javax/vecmath/Tuple2d.java
index 665b6bf..443bba7 100644
--- a/src/javax/vecmath/Tuple2d.java
+++ b/src/javax/vecmath/Tuple2d.java
@@ -329,9 +329,11 @@ public abstract class Tuple2d implements java.io.Serializable, Cloneable {
double diff;
diff = x - t1.x;
+ if(Double.isNaN(diff)) return false;
if((diff<0?-diff:diff) > epsilon) return false;
diff = y - t1.y;
+ if(Double.isNaN(diff)) return false;
if((diff<0?-diff:diff) > epsilon) return false;
return true;
@@ -534,4 +536,52 @@ public abstract class Tuple2d implements java.io.Serializable, Cloneable {
}
}
+
+ /**
+ * Get the <i>x</i> coordinate.
+ *
+ * @return the <i>x</i> coordinate.
+ *
+ * @since vecmath 1.5
+ */
+ public final double getX() {
+ return x;
+ }
+
+
+ /**
+ * Set the <i>x</i> coordinate.
+ *
+ * @param x value to <i>x</i> coordinate.
+ *
+ * @since vecmath 1.5
+ */
+ public final void setX(double x) {
+ this.x = x;
+ }
+
+
+ /**
+ * Get the <i>y</i> coordinate.
+ *
+ * @return the <i>y</i> coordinate.
+ *
+ * @since vecmath 1.5
+ */
+ public final double getY() {
+ return y;
+ }
+
+
+ /**
+ * Set the <i>y</i> coordinate.
+ *
+ * @param y value to <i>y</i> coordinate.
+ *
+ * @since vecmath 1.5
+ */
+ public final void setY(double y) {
+ this.y = y;
+ }
+
}