bool isMidPointInPolygon(List<PointD> polygon) { return PointD((source.x + target.x) / 2, (source.y + target.y) / 2) .isInPolygon(polygon); }