PositionsToIntWithArray 永远获取第二个问题处理

This commit is contained in:
kercylan98 2023-06-09 19:20:19 +08:00
parent 04d9b14896
commit b52398e1d7
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ func PositionToIntWithArray(width int, xy [2]int) int {
func PositionsToIntWithArray(width int, xys ...[2]int) []int { func PositionsToIntWithArray(width int, xys ...[2]int) []int {
var result = make([]int, len(xys), len(xys)) var result = make([]int, len(xys), len(xys))
for i := 0; i < len(xys); i++ { for i := 0; i < len(xys); i++ {
result[i] = PositionToIntWithArray(width, xys[1]) result[i] = PositionToIntWithArray(width, xys[i])
} }
return result return result
} }