index.js
function distBBox(node, k, p, toBBox, destNode) {
    if (!destNode) destNode = createNode(null);
    destNode.minX = Infinity;
    destNode.minY = Infinity;
    destNode.maxX = -Infinity;
    destNode.maxY = -Infinity;

    for (var i = k, child; i < p; i++) {
        child = node.children[i];
        extend(destNode, node.leaf ? toBBox(child) : child);
    }

    return destNode;
}
function distBBox(node, k, p, toBBox, destNode) {
    if (!destNode) destNode = createNode(null);
    destNode.minX = Infinity;
    destNode.minY = Infinity;
    destNode.maxX = -Infinity;
    destNode.maxY = -Infinity;

    for (var i = k, child; i < p; i++) {
        child = node.children[i];
        extend(destNode, node.leaf ? toBBox(child) : child);
    }

    return destNode;
}
function distBBox ( node , k , p , toBBox , destNode ) { if ( ! destNode ) destNode = createNode ( null ) ; destNode . minX = Infinity ; destNode . minY = Infinity ; destNode . maxX = - Infinity ; destNode . maxY = - Infinity ; for ( var i = k , child ; i < p ; i ++ ) { child = node . children [ i ] ; extend ( destNode , node . leaf ? toBBox ( child ) : child ) ; } return destNode ; }
min bounding rectangle of node children from k to p-1
min bounding rectangle of node children from k to p - 1