| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final long | |
| public int | x
The x coordinate. |
| public int | y
The y coordinate. |
| Access | Constructor and Description |
|---|---|
| public | Tuple2i(int
the x coordinate x, int the y coordinate y)Constructs and initializes a Tuple2i from the specified x and y coordinates. |
| public | Tuple2i(int[]
the array of length 2 containing x and y in order. t)Constructs and initializes a Tuple2i from the array of length 2. |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | clamp(int
the lowest value in this tuple after clamping min, int the highest value in this tuple after clamping max)Clamps this tuple to the range [low, high]. |
| public final void | |
| public final void | clampMax(int
the highest value in the tuple after clamping max)Clamps the maximum value of this tuple to the max parameter. |
| public final void | |
| public final void | clampMin(int
the lowest value in this tuple after clamping min)Clamps the minimum value of this tuple to the min parameter. |
| public Object | Returns: a clone of this instance.Overrides java. |
| public boolean | equals(Object
the object with which the comparison is made t1)Overrides java. |
| public final void | |
| public final void | |
| public final int | |
| public final int | |
| public int | Returns: the integer hash code valueOverrides java. |
| public final void | |
| public final void | |
| public final void | |
| public final void | scale(int
the scalar value s)Sets the value of this tuple to the scalar multiplication of the scale factor with this. |
| public final void | |
| public final void | |
| public final void | set(int
the x coordinate x, int the y coordinate y)Sets the value of this tuple to the specified x and y coordinates. |
| public final void | set(int[]
the array of length 2 containing x and y in order. t)Sets the value of this tuple to the specified coordinates in the array of length 2. |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public String | Returns: the String representationOverrides java. |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| x | back to summary |
|---|---|
| public int x The x coordinate. | |
| y | back to summary |
|---|---|
| public int y The y coordinate. | |
| Tuple2i | back to summary |
|---|---|
| public Tuple2i(int x, int y) Constructs and initializes a Tuple2i from the specified x and y coordinates.
| |
| Tuple2i | back to summary |
|---|---|
| public Tuple2i(int[] t) Constructs and initializes a Tuple2i from the array of length 2.
| |
| Tuple2i | back to summary |
|---|---|
| public Tuple2i(Tuple2i t1) Constructs and initializes a Tuple2i from the specified Tuple2i.
| |
| Tuple2i | back to summary |
|---|---|
| public Tuple2i() Constructs and initializes a Tuple2i to (0,0). | |
| absolute | back to summary |
|---|---|
| public final void absolute(Tuple2i t) Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.
| |
| absolute | back to summary |
|---|---|
| public final void absolute() Sets each component of this tuple to its absolute value. | |
| add | back to summary |
|---|---|
| public final void add(Tuple2i t1, Tuple2i t2) Sets the value of this tuple to the sum of tuples t1 and t2. | |
| add | back to summary |
|---|---|
| public final void add(Tuple2i t1) Sets the value of this tuple to the sum of itself and t1.
| |
| clamp | back to summary |
|---|---|
| public final void clamp(int min, int max, Tuple2i t) Clamps the tuple parameter to the range [low, high] and places the values into this tuple.
| |
| clamp | back to summary |
|---|---|
| public final void clamp(int min, int max) Clamps this tuple to the range [low, high].
| |
| clampMax | back to summary |
|---|---|
| public final void clampMax(int max, Tuple2i t) Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
| |
| clampMax | back to summary |
|---|---|
| public final void clampMax(int max) Clamps the maximum value of this tuple to the max parameter.
| |
| clampMin | back to summary |
|---|---|
| public final void clampMin(int min, Tuple2i t) Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
| |
| clampMin | back to summary |
|---|---|
| public final void clampMin(int min) Clamps the minimum value of this tuple to the min parameter.
| |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Creates a new object of the same class as this object.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object t1) Overrides java. Returns true if the Object t1 is of type Tuple2i and all of the data members of t1 are equal to the corresponding data members in this Tuple2i.
| |
| get | back to summary |
|---|---|
| public final void get(int[] t) Copies the values of this tuple into the array t.
| |
| get | back to summary |
|---|---|
| public final void get(Tuple2i t) Copies the values of this tuple into the tuple t.
| |
| getX | back to summary |
|---|---|
| public final int getX() Get the x coordinate.
| |
| getY | back to summary |
|---|---|
| public final int getY() Get the y coordinate.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns a hash code value based on the data values in this object. Two different Tuple2i objects with identical data values (i.e., Tuple2i.equals returns true) will return the same hash code value. Two objects with different data members may return the same hash value, although this is not likely.
| |
| negate | back to summary |
|---|---|
| public final void negate(Tuple2i t1) Sets the value of this tuple to the negation of tuple t1.
| |
| negate | back to summary |
|---|---|
| public final void negate() Negates the value of this tuple in place. | |
| scale | back to summary |
|---|---|
| public final void scale(int s, Tuple2i t1) Sets the value of this tuple to the scalar multiplication of tuple t1.
| |
| scale | back to summary |
|---|---|
| public final void scale(int s) Sets the value of this tuple to the scalar multiplication of the scale factor with this.
| |
| scaleAdd | back to summary |
|---|---|
| public final void scaleAdd(int s, Tuple2i t1, Tuple2i t2) Sets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2). | |
| scaleAdd | back to summary |
|---|---|
| public final void scaleAdd(int s, Tuple2i t1) Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1).
| |
| set | back to summary |
|---|---|
| public final void set(int x, int y) Sets the value of this tuple to the specified x and y coordinates.
| |
| set | back to summary |
|---|---|
| public final void set(int[] t) Sets the value of this tuple to the specified coordinates in the array of length 2.
| |
| set | back to summary |
|---|---|
| public final void set(Tuple2i t1) Sets the value of this tuple to the value of tuple t1.
| |
| setX | back to summary |
|---|---|
| public final void setX(int x) Set the x coordinate.
| |
| setY | back to summary |
|---|---|
| public final void setY(int y) Set the y coordinate.
| |
| sub | back to summary |
|---|---|
| public final void sub(Tuple2i t1, Tuple2i t2) Sets the value of this tuple to the difference of tuples t1 and t2 (this = t1 - t2). | |
| sub | back to summary |
|---|---|
| public final void sub(Tuple2i t1) Sets the value of this tuple to the difference of itself and t1 (this = this - t1).
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string that contains the values of this Tuple2i. The form is (x,y).
| |