midpointTo method

Point midpointTo(
  1. Point other
)

Returns the midpoint between this point and another.

Implementation

Point midpointTo(Point other) {
  return Point(
    (x + other.x) / 2,
    (y + other.y) / 2,
  );
}