public int getLevelForDistance(double dist) {if (dist == 0){return maxLevels;}int level =  S2Projections.MAX_WIDTH.getMinLevel(dist * DistanceUtils.DEGREES_TO_RADIANS);int roundLevel = level % arity != 0 ? 1 : 0;level = level/arity + roundLevel;return Math.min(maxLevels, level + 1);}

public override int GetLevelForDistance(double dist){if (dist == 0){return m_maxLevels;}int level = GeohashUtils.LookupHashLenForWidthHeight(dist, dist);return Math.Max(Math.Min(level, m_maxLevels), 1);}
