aa
This commit is contained in:
@@ -560,6 +560,7 @@ func CalculateCoverArea(coordinate []string, vendorID int) (area float64) {
|
||||
for i := 0; i < len(xyList)-1; i++ {
|
||||
// sum += (xyList[i+1][0] - xyList[i][0]) * (xyList[i+1][1] + xyList[i][1])
|
||||
sum += (xyList[i][0]*xyList[i+1][1] - xyList[i+1][0]*xyList[i][1])
|
||||
fmt.Println("CalculateCoverArea ,", sum, xyList[i][0]*xyList[i+1][1], xyList[i+1][0]*xyList[i][1])
|
||||
}
|
||||
// sum += (xyList[0][0] - xyList[len(xyList)-1][0]) * (xyList[0][1] + xyList[len(xyList)-1][1])
|
||||
sum += (xyList[len(xyList)-1][0]*xyList[0][1] - xyList[0][0]*xyList[len(xyList)-1][1])
|
||||
|
||||
Reference in New Issue
Block a user