code: function computeBoundingBox(points) {
  
              if (points.length === 0) {
                  return false;
              }
  
              var left = points[0].x;
              var right = points[0].x;
              var top = points[0].y;
              var bottom = points[0].y;
  
              for (var i = 1; i < points.length; i++) {
                  var p = points[i];
  
                  if (p.x < left) {
                      left = p.x;
                  }
  
                  if (p.x > right) {
                      right = p.x;
                  }
  
                  if (p.y < top) {
                      top = p.y;
                  }
  
                  if (p.y > bottom) {
                      bottom = p.y;
                  }
              }
  
              return {
                  x: left,
                  y: top,
                  width: right - left,
                  height: bottom - top
              };
          }
docs: 计算包围盒
  
  @param {Array} points 点集
  @return {Object} bounding box