equals method

bool equals(
  1. GPoint point
)

Checks if this GPoint is equal to another GPoint by comparing their x and y coordinates. Returns true if they are equal, otherwise false.

Implementation

bool equals(GPoint point) {
  return x == point.x && y == point.y;
}