liuxiaolong
2019-11-07 73e4d775a359b5490b5ebc1465f1b9d682a3bbe5
ruleserver/geoPolygon.go
@@ -73,7 +73,7 @@
}
//GetLocation 将一个给定起始坐标,宽度长度的矩形区域均分为n方份并返回中心坐标(n为单边平分数值)和面积
func getLocation(rect structure.Rect, n int) ([]Pointfloat, float64) {
func getLocation(rect structure.Rect, n int) ([]structure.Pointfloat, float64) {
   xArr := make([]float64, n) // 用切片不用数组,数组不能用变量定义长度
   yArr := make([]float64, n)
   pointArr := make([]Pointfloat, 0, n*n)