获取一个宽高可表达的所有特定尺寸以上的矩形形状bug处理
This commit is contained in:
parent
aac9d8a9fc
commit
60afa3b391
|
@ -1,7 +1,6 @@
|
||||||
package g2d
|
package g2d
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"github.com/kercylan98/minotaur/utils/g2d/shape"
|
"github.com/kercylan98/minotaur/utils/g2d/shape"
|
||||||
"sort"
|
"sort"
|
||||||
)
|
)
|
||||||
|
@ -530,10 +529,6 @@ func SearchNotRepeatFullRectangle(minWidth, minHeight int, xys ...[2]int) (resul
|
||||||
for _, point := range points {
|
for _, point := range points {
|
||||||
px, py := PositionArrayToXY(point)
|
px, py := PositionArrayToXY(point)
|
||||||
ox, oy := px+x, py+y
|
ox, oy := px+x, py+y
|
||||||
if ox >= len(rectangleShape) || oy >= len(rectangleShape[0]) {
|
|
||||||
rectangleShape := GenerateShape(xys...)
|
|
||||||
fmt.Println(rectangleShape)
|
|
||||||
}
|
|
||||||
if record[ox][oy] || !rectangleShape[ox][oy] {
|
if record[ox][oy] || !rectangleShape[ox][oy] {
|
||||||
find = 0
|
find = 0
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue