equals2D method
Returns whether the planar projections of the two Coordinate
s
are equal.
@param other a Coordinate
with which to do the 2D comparison.
@return true
if the x- and y-coordinates are equal; the
z-coordinates do not have to be equal.
Implementation
bool equals2D(Coordinate other) {
if (x != other.x) {
return false;
}
if (y != other.y) {
return false;
}
return true;
}