simplifiing update

This commit is contained in:
unknown 2020-08-08 07:26:41 +02:00
parent b35f160475
commit 0364361fbe
1 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ func (q *Quadtree) split() {
halfW := q.W() / 2 halfW := q.W() / 2
center := q.Center() center := q.Center()
q.tl = &Quadtree{ q.tl = &Quadtree{
Rect: pixel.R(q.Min.X, q.Min.Y+halfH,q.Max.X-halfW, q.Max.Y), Rect: pixel.R(q.Min.X, q.Min.Y+halfH, q.Max.X-halfW, q.Max.Y),
pr: q, pr: q,
Common: newCommon, Common: newCommon,
} }
@ -81,7 +81,7 @@ func (q *Quadtree) split() {
Common: newCommon, Common: newCommon,
} }
q.br = &Quadtree{ q.br = &Quadtree{
Rect: pixel.R(q.Min.X+halfW, q.Min.Y,q.Max.X, q.Min.Y+halfH), Rect: pixel.R(q.Min.X+halfW, q.Min.Y, q.Max.X, q.Min.Y+halfH),
pr: q, pr: q,
Common: newCommon, Common: newCommon,
} }