File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
cardinal-android/app/src/main/java/earth/maps/cardinal/data Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ object GeoUtils {
3232 private const val METERS_TO_MILES = 1609.34
3333 private const val METERS_TO_FEET = 3.28084
3434
35+ private const val SHORT_DISTANCE_THRESHOLD_METERS = 200.0
36+
3537 /* *
3638 * Formats a distance in meters to a human-readable string based on the unit preference.
3739 *
@@ -98,7 +100,7 @@ object GeoUtils {
98100 * @return Formatted short distance string (e.g., "150 m" or "490 ft")
99101 */
100102 fun formatShortDistance (meters : Double , unitPreference : Int ): String {
101- if (meters > 200.0 ) {
103+ if (meters > SHORT_DISTANCE_THRESHOLD_METERS ) {
102104 return formatDistance(meters, unitPreference)
103105 }
104106 return when (unitPreference) {
You can’t perform that action at this time.
0 commit comments