fix: QuadTree nodes can be a list
This commit is contained in:
parent
97c3bb8c5a
commit
0fdff9b33c
|
@ -27,10 +27,11 @@ export class QuadTree {
|
|||
if (4 === node.length) {
|
||||
return;
|
||||
}
|
||||
if (!Rectangle.intersects(queryRectangle, node.data)) {
|
||||
return;
|
||||
}
|
||||
nodes.push(node);
|
||||
do {
|
||||
if (Rectangle.intersects(queryRectangle, node.data)) {
|
||||
nodes.push(node);
|
||||
}
|
||||
} while (node = node.next);
|
||||
});
|
||||
return nodes;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user