取得所有点列表中的最大值GetMaxPoint
private static Point Fun(Point p1, Point p2)
{
if (p2.X > p1.X && p2.Y > p1.Y) return p2;
else return p1;
}
static Point GetMaxPoint(List<Point> listHeatPoints)
{
Point maxPoint = new Point(0, 0);
List<Point> result = new List<Point>();
foreach (Point point in listHeatPoints)
{
maxPoint = Fun(maxPoint, point);
}
return maxPoint;
}
标签:p2,p1,return,Point,maxPoint,最大值,List,列表,GetMaxPoint From: https://blog.51cto.com/u_15983015/6088283