code: function(latlng) {
          // necessary to maintain accurately sized circles
          // to change scale to miles (for example), you will need to convert 40075017 (equatorial circumference of the Earth in metres) to miles
          var map = this._map,
              lngRadius = (this.size / 40075017) *
                  360 / 
                  Math.cos((Math.PI / 180) * latlng.lat),
              latlng2 = new L.LatLng(latlng.lat, latlng.lng - lngRadius),
              point = map.latLngToLayerPoint(latlng),
              point2 = map.latLngToLayerPoint(latlng2);
  
          return Math.max(Math.round(point.x - point2.x), 1);
      }
docs: scale methods