-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Description
Hi, It took me some time to find this examlple
// Find the nodes within the specified rectangle.
function search(quadtree, x0, y0, x3, y3) {
quadtree.visit(function(node, x1, y1, x2, y2) {
if (!node.length) {
do {
var d = node.data;
d.scanned = true;
d.selected = (d[0] >= x0) && (d[0] < x3) && (d[1] >= y0) && (d[1] < y3);
} while (node = node.next);
}
return x1 >= x3 || y1 >= y3 || x2 < x0 || y2 < y0;
});
}Please add this method to the tree, or at least add it to the README
Metadata
Metadata
Assignees
Labels
No labels