equals2D method

bool equals2D(
  1. Coordinate other
)

Returns whether the planar projections of the two Coordinates 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;
}