解决方法
你要
calculate the area of a polygon?
(从链接,转换为C#)
class Point { double x,y; } double PolygonArea(Point[] polygon) { int i,j; double area = 0; for (i=0; i < polygon.Length; i++) { j = (i + 1) % polygon.Length; area += polygon[i].x * polygon[j].y; area -= polygon[i].y * polygon[j].x; } area /= 2; return (area < 0 ? -area : area); }