横线直线搜索bug处理

This commit is contained in:
kercylan98 2023-06-05 19:50:04 +08:00
parent 596968dab9
commit f4c4ae4ddc
1 changed files with 1 additions and 1 deletions

View File

@ -283,7 +283,7 @@ func SearchNotRepeatStraightLine(minLength int, xys ...[2]int) (result [][][2]in
}
end:
{
if len(find) != 2 {
if len(points) < minLength-1 {
continue
}
result = append(result, append(points, [2]int{x + left, y + top}))