setPoints method

void setPoints(
  1. int x1,
  2. int y1,
  3. int x2,
  4. int y2,
)

Sets the points of the Rectangle struct.

  • x1, y1, x2, y2: The coordinates of the points.

Implementation

void setPoints(int x1, int y1, int x2, int y2) {
  points[0] = x1;
  points[1] = y1;
  points[2] = x2;
  points[3] = y2;
}