diff options
Diffstat (limited to 'src/javax/vecmath/Tuple2f.java')
-rw-r--r-- | src/javax/vecmath/Tuple2f.java | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/javax/vecmath/Tuple2f.java b/src/javax/vecmath/Tuple2f.java index 85f5319..e75fafc 100644 --- a/src/javax/vecmath/Tuple2f.java +++ b/src/javax/vecmath/Tuple2f.java @@ -331,9 +331,11 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { float diff; diff = x - t1.x; + if(Float.isNaN(diff)) return false; if((diff<0?-diff:diff) > epsilon) return false; diff = y - t1.y; + if(Float.isNaN(diff)) return false; if((diff<0?-diff:diff) > epsilon) return false; return true; @@ -538,4 +540,51 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { } } + + /** + * Get the <i>x</i> coordinate. + * + * @return the <i>x</i> coordinate. + * + * @since vecmath 1.5 + */ + public final float 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(float x) { + this.x = x; + } + + + /** + * Get the <i>y</i> coordinate. + * + * @return the <i>y</i> coordinate. + * + * @since vecmath 1.5 + */ + public final float 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(float y) { + this.y = y; + } } |