equals method

bool equals(
  1. Point p
)

Implementation

bool equals(Point p) {
  return x == p.x && y == p.y;
}