public interface Tuple2DReadOnly
A tuple is an abstract geometry object holding onto the common math between a 2D point and vector.
Although a point and vector hold onto the same type of information, the distinction is made between them as they represent different geometry objects and are typically not handled the same way:
| Modifier and Type | Method and Description | 
|---|---|
default boolean | 
containsNaN()
Tests if this tuple contains a  
Double.NaN. | 
default boolean | 
epsilonEquals(Tuple2DReadOnly other,
             double epsilon)
Tests on a per component basis if this tuple is equal to the given  
other to an
 epsilon. | 
default boolean | 
equals(Tuple2DReadOnly other)
Tests on a per component basis, if this tuple is exactly equal to  
other. | 
default void | 
get(org.ejml.data.DenseMatrix64F tupleMatrixToPack)
Packs the components  
x, y in order in a column vector starting from its first
 row index. | 
default void | 
get(double[] tupleArrayToPack)
Packs the components  
x, y in order in an array starting from its first index. | 
default void | 
get(float[] tupleArrayToPack)
Packs the components  
x, y in order in an array starting from its first index. | 
default void | 
get(int startRow,
   org.ejml.data.DenseMatrix64F tupleMatrixToPack)
Packs the components  
x, y in order in a column vector starting from
 startRow. | 
default void | 
get(int startIndex,
   double[] tupleArrayToPack)
Packs the components  
x, y in order in an array starting from
 startIndex. | 
default void | 
get(int startIndex,
   float[] tupleArrayToPack)
Packs the components  
x, y in order in an array starting from
 startIndex. | 
default void | 
get(int startRow,
   int column,
   org.ejml.data.DenseMatrix64F tupleMatrixToPack)
Packs the components  
x, y in order in a column vector starting from
 startRow at the column index column. | 
default double | 
getElement(int index)
Selects a component of this tuple based on  
index and returns its value. | 
default float | 
getElement32(int index)
Selects a component of this tuple based on  
index and returns its value. | 
double | 
getX()
Returns the x-component of this tuple. 
 | 
default float | 
getX32()
Returns the x-component of this tuple. 
 | 
double | 
getY()
Returns the y-component of this tuple. 
 | 
default float | 
getY32()
Returns the y-component of this tuple. 
 | 
double getX()
double getY()
default float getX32()
default float getY32()
default boolean containsNaN()
Double.NaN.true if this tuple contains a Double.NaN, false otherwise.default double getElement(int index)
index and returns its value.
 
 For an index of 0, the corresponding component is x, while for 1 it is
 y.
 
index - the index of the component to get.java.lang.IndexOutOfBoundsException - if index ∉ [0, 1].default float getElement32(int index)
index and returns its value. For an
 index of 0, the corresponding component is x, while for 1 it is y.index - the index of the component to get.java.lang.IndexOutOfBoundsException - if index ∉ [0, 1].default void get(double[] tupleArrayToPack)
x, y in order in an array starting from its first index.tupleArrayToPack - the array in which this tuple is stored. Modified.default void get(int startIndex,
                 double[] tupleArrayToPack)
x, y in order in an array starting from
 startIndex.startIndex - the index in the array where the first component is stored.tupleArrayToPack - the array in which this tuple is stored. Modified.default void get(float[] tupleArrayToPack)
x, y in order in an array starting from its first index.tupleArrayToPack - the array in which this tuple is stored. Modified.default void get(int startIndex,
                 float[] tupleArrayToPack)
x, y in order in an array starting from
 startIndex.startIndex - the index in the array where the first component is stored.tupleArrayToPack - the array in which this tuple is stored. Modified.default void get(org.ejml.data.DenseMatrix64F tupleMatrixToPack)
x, y in order in a column vector starting from its first
 row index.tupleMatrixToPack - the array in which this tuple is stored. Modified.default void get(int startRow,
                 org.ejml.data.DenseMatrix64F tupleMatrixToPack)
x, y in order in a column vector starting from
 startRow.startRow - the first row index to start writing in the dense-matrix.tupleMatrixToPack - the column vector in which this tuple is stored. Modified.default void get(int startRow,
                 int column,
                 org.ejml.data.DenseMatrix64F tupleMatrixToPack)
x, y in order in a column vector starting from
 startRow at the column index column.startRow - the first row index to start writing in the dense-matrix.column - the column index to write in the dense-matrix.tupleMatrixToPack - the matrix in which this tuple is stored. Modified.default boolean epsilonEquals(Tuple2DReadOnly other, double epsilon)
other to an
 epsilon.other - the other tuple to compare against this. Not modified.epsilon - the tolerance to use when comparing each component.true if the two tuples are equal, false otherwise.default boolean equals(Tuple2DReadOnly other)
other.other - the other tuple to compare against this. Not modified.true if the two tuples are exactly equal component-wise, false
         otherwise.