code: function compareTiles( previousBest, tile ) {
      if ( !previousBest ) {
          return tile;
      }
  
      if ( tile.visibility > previousBest.visibility ) {
          return tile;
      } else if ( tile.visibility == previousBest.visibility ) {
          if ( tile.squaredDistance < previousBest.squaredDistance ) {
              return tile;
          }
      }
  
      return previousBest;
  }
docs: @private
  @inner
  Determines whether the 'last best' tile for the area is better than the
  tile in question.
  
  @param {OpenSeadragon.Tile} previousBest
  @param {OpenSeadragon.Tile} tile
  @returns {OpenSeadragon.Tile} The new best tile.