index.js
function rbushTreeItem(ring, edge) {

    var start = coord[ring][edge];
    var end = coord[ring][edge+1];

    if (start[0] < end[0]) {
      var minX = start[0], maxX = end[0];
    } else {
      var minX = end[0], maxX = start[0];
    };
    if (start[1] < end[1]) {
      var minY = start[1], maxY = end[1];
    } else {
      var minY = end[1], maxY = start[1];
    }
    return {minX: minX, minY: minY, maxX: maxX, maxY: maxY, ring: ring, edge: edge};
  }
function rbushTreeItem(ring, edge) {

    var start = coord[ring][edge];
    var end = coord[ring][edge+1];

    if (start[0] < end[0]) {
      var minX = start[0], maxX = end[0];
    } else {
      var minX = end[0], maxX = start[0];
    };
    if (start[1] < end[1]) {
      var minY = start[1], maxY = end[1];
    } else {
      var minY = end[1], maxY = start[1];
    }
    return {minX: minX, minY: minY, maxX: maxX, maxY: maxY, ring: ring, edge: edge};
  }
function rbushTreeItem ( ring , edge ) { var start = coord [ ring ] [ edge ] ; var end = coord [ ring ] [ edge + 1 ] ; if ( start [ 0 ] < end [ 0 ] ) { var minX = start [ 0 ] , maxX = end [ 0 ] ; } else { var minX = end [ 0 ] , maxX = start [ 0 ] ; } ; if ( start [ 1 ] < end [ 1 ] ) { var minY = start [ 1 ] , maxY = end [ 1 ] ; } else { var minY = end [ 1 ] , maxY = start [ 1 ] ; } return { minX : minX , minY : minY , maxX : maxX , maxY : maxY , ring : ring , edge : edge } ; }
Function to return a rbush tree item given an ring and edge number
Function to return a rbush tree item given an ring and edge number