javax.vecmath
Class Tuple2d

java.lang.Object
  extended by javax.vecmath.Tuple2d
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Point2d, Vector2d

public abstract class Tuple2d
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

A generic 2-element tuple that is represented by double-precision floating point x,y coordinates.

See Also:
Serialized Form

Field Summary
 double x
          The x coordinate.
 double y
          The y coordinate.
 
Constructor Summary
Tuple2d()
          Constructs and initializes a Tuple2d to (0,0).
Tuple2d(double[] t)
          Constructs and initializes a Tuple2d from the specified array.
Tuple2d(double x, double y)
          Constructs and initializes a Tuple2d from the specified xy coordinates.
Tuple2d(Tuple2d t1)
          Constructs and initializes a Tuple2d from the specified Tuple2d.
Tuple2d(Tuple2f t1)
          Constructs and initializes a Tuple2d from the specified Tuple2f.
 
Method Summary
 void absolute()
          Sets each component of this tuple to its absolute value.
 void absolute(Tuple2d t)
          Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.
 void add(Tuple2d t1)
          Sets the value of this tuple to the vector sum of itself and tuple t1.
 void add(Tuple2d t1, Tuple2d t2)
          Sets the value of this tuple to the vector sum of tuples t1 and t2.
 void clamp(double min, double max)
          Clamps this tuple to the range [low, high].
 void clamp(double min, double max, Tuple2d t)
          Clamps the tuple parameter to the range [low, high] and places the values into this tuple.
 void clampMax(double max)
          Clamps the maximum value of this tuple to the max parameter.
 void clampMax(double max, Tuple2d t)
          Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
 void clampMin(double min)
          Clamps the minimum value of this tuple to the min parameter.
 void clampMin(double min, Tuple2d t)
          Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
 java.lang.Object clone()
          Creates a new object of the same class as this object.
 boolean epsilonEquals(Tuple2d t1, double epsilon)
          Returns true if the L-infinite distance between this tuple and tuple t1 is less than or equal to the epsilon parameter, otherwise returns false.
 boolean equals(java.lang.Object t1)
          Returns true if the Object t1 is of type Tuple2d and all of the data members of t1 are equal to the corresponding data members in this Tuple2d.
 boolean equals(Tuple2d t1)
          Returns true if all of the data members of Tuple2d t1 are equal to the corresponding data members in this Tuple2d.
 void get(double[] t)
          Copies the value of the elements of this tuple into the array t.
 double getX()
          Get the x coordinate.
 double getY()
          Get the y coordinate.
 int hashCode()
          Returns a hash code value based on the data values in