js/leaflet.markercluster.js
function (latLngs) {
      // find first baseline
      var maxLat = false, minLat = false,
        maxPt = null, minPt = null,
        i;

      for (i = latLngs.length - 1; i >= 0; i--) {
        var pt = latLngs[i];
        if (maxLat === false || pt.lat > maxLat) {
          maxPt = pt;
          maxLat = pt.lat;
        }
        if (minLat === false || pt.lat < minLat) {
          minPt = pt;
          minLat = pt.lat;
        }
      }
      var ch = [].concat(this.buildConvexHull([minPt, maxPt], latLngs),
                this.buildConvexHull([maxPt, minPt], latLngs));
      return ch;
    }
function (latLngs) {
      // find first baseline
      var maxLat = false, minLat = false,
        maxPt = null, minPt = null,
        i;

      for (i = latLngs.length - 1; i >= 0; i--) {
        var pt = latLngs[i];
        if (maxLat === false || pt.lat > maxLat) {
          maxPt = pt;
          maxLat = pt.lat;
        }
        if (minLat === false || pt.lat < minLat) {
          minPt = pt;
          minLat = pt.lat;
        }
      }
      var ch = [].concat(this.buildConvexHull([minPt, maxPt], latLngs),
                this.buildConvexHull([maxPt, minPt], latLngs));
      return ch;
    }
/*
Given an array of latlngs, compute a convex hull as an array
of latlngs

@param {Array} latLngs
@returns {Array}