getBottomPoint method Null safety
Get the furthest bottom point of the polygon
Implementation
static Point getBottomPoint(List<Point> polygon) {
assert(polygon.length >= 3);
var bottomPoint = Point<num>(double.infinity, double.infinity);
for (var p in polygon) {
if (p.y < bottomPoint.y) {
bottomPoint = p;
}
}
return bottomPoint;
}