subtract method

GPoint subtract(
  1. GPoint point
)

Subtracts the coordinates of another point from the coordinates of this point to create a new point.

Implementation

GPoint subtract(GPoint point) {
  return GPoint(x - point.x, y - point.y);
}