mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/bsp: Refactoring
This commit is contained in:
parent
798a826e50
commit
f953afc518
@ -91,7 +91,6 @@ func (n *Node) alloc(width, height int) *Node {
|
||||
height: n.height,
|
||||
parent: n,
|
||||
}
|
||||
return n.child0.alloc(width, height)
|
||||
} else {
|
||||
// Split holizontally
|
||||
n.child0 = &Node{
|
||||
@ -108,8 +107,8 @@ func (n *Node) alloc(width, height int) *Node {
|
||||
height: n.height - height,
|
||||
parent: n,
|
||||
}
|
||||
return n.child0.alloc(width, height)
|
||||
}
|
||||
return n.child0.alloc(width, height)
|
||||
}
|
||||
if n.child0 == nil || n.child1 == nil {
|
||||
panic("not reached")
|
||||
|
Loading…
Reference in New Issue
Block a user