getMostRightPoint method Null safety
Get the furthest right point of the polygon
Implementation
static Point getMostRightPoint(List<Point> polygon) {
assert(polygon.length >= 3);
var mostRightPoint =
Point<num>(double.negativeInfinity, double.negativeInfinity);
for (var p in polygon) {
if (p.x > mostRightPoint.x) {
mostRightPoint = p;
}
}
return mostRightPoint;
}