File-By-File
Coordinate

Coordinate

This class represents a two-dimensional coordinate using integer values for X and Y. It provides basic arithmetic operations and conversion methods to other point types.

Methods

Coordinate(int x, int y)

Constructs a new Coordinate with the specified X and Y integer values.

x()

Returns the X-coordinate of this Coordinate.

y()

Returns the Y-coordinate of this Coordinate.

toPointXY()

Converts this Coordinate to a PointXY object (which uses double values).

toPointXYZ(Angle z)

Converts this Coordinate to a PointXYZ object, using the provided Angle for the Z-component.

add(Coordinate coordinate)

Adds another Coordinate to this Coordinate (component-wise addition).

subtract(Coordinate coordinate)

Subtracts another Coordinate from this Coordinate (component-wise subtraction).

multiply(Coordinate coordinate)

Multiplies this Coordinate by another Coordinate (component-wise multiplication).

divide(Coordinate coordinate)

Divides this Coordinate by another Coordinate (component-wise division).

hashCode()

Returns a hash code value for the object.

equals(Object obj)

Indicates whether some other object is "equal to" this one. Two Coordinate objects are equal if their X and Y components are the same.

toString()

Returns a string representation of the Coordinate in the format "(x, y)".