| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| public int | |
| public int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public GridPoint2 | Returns: this 2d grid point for chaining.The other point other)Adds another 2D grid point to this point. |
| public GridPoint2 | Returns: this 2d grid point for chaining.The x-coordinate of the other point x, int The y-coordinate of the other point y)Adds another 2D grid point to this point. |
| public GridPoint2 | |
| public float | |
| public float | dst(int
The x-coordinate of the other point x, int The y-coordinate of the other point y)Returns: the distance between this point and the other point. |
| public float | dst2(GridPoint2
The other point other)Returns: the squared distance between this point and the other point. |
| public float | dst2(int
The x-coordinate of the other point x, int The y-coordinate of the other point y)Returns: the squared distance between this point and the other point. |
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public int | |
| public GridPoint2 | Returns: this 2D grid point for chaining.The 2D grid point to copy the coordinates of. point)Sets the coordinates of this 2D grid point to that of another. |
| public GridPoint2 | Returns: this 2D grid point for chaining.X coordinate x, int Y coordinate y)Sets the coordinates of this 2D grid point. |
| public GridPoint2 | Returns: this 2d grid point for chaining.The other point other)Subtracts another 2D grid point from this point. |
| public GridPoint2 | Returns: this 2d grid point for chaining.The x-coordinate of the other point x, int The y-coordinate of the other point y)Subtracts another 2D grid point from this point. |
| public String |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| x | back to summary |
|---|---|
| public int x | |
| y | back to summary |
|---|---|
| public int y | |
| GridPoint2 | back to summary |
|---|---|
| public GridPoint2() Constructs a new 2D grid point. | |
| GridPoint2 | back to summary |
|---|---|
| public GridPoint2(int x, int y) Constructs a new 2D grid point.
| |
| GridPoint2 | back to summary |
|---|---|
| public GridPoint2(GridPoint2 point) Copy constructor
| |
| add | back to summary |
|---|---|
| public GridPoint2 add(GridPoint2 other) Adds another 2D grid point to this point.
| |
| add | back to summary |
|---|---|
| public GridPoint2 add(int x, int y) Adds another 2D grid point to this point.
| |
| cpy | back to summary |
|---|---|
public GridPoint2 cpy()
| |
| dst | back to summary |
|---|---|
public float dst(GridPoint2 other)
| |
| dst | back to summary |
|---|---|
public float dst(int x, int y)
| |
| dst2 | back to summary |
|---|---|
public float dst2(GridPoint2 other)
| |
| dst2 | back to summary |
|---|---|
public float dst2(int x, int y)
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| set | back to summary |
|---|---|
| public GridPoint2 set(GridPoint2 point) Sets the coordinates of this 2D grid point to that of another.
| |
| set | back to summary |
|---|---|
| public GridPoint2 set(int x, int y) Sets the coordinates of this 2D grid point.
| |
| sub | back to summary |
|---|---|
| public GridPoint2 sub(GridPoint2 other) Subtracts another 2D grid point from this point.
| |
| sub | back to summary |
|---|---|
| public GridPoint2 sub(int x, int y) Subtracts another 2D grid point from this point.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |