Skip to content

Commit 2701c81

Browse files
authored
fix: increases miles per meter accuracy (#71)
1 parent 861c1f1 commit 2701c81

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

  • places-compose/src/main/java/com/google/android/libraries/places/compose/autocomplete

places-compose/src/main/java/com/google/android/libraries/places/compose/autocomplete/data/Units.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14+
@file:Suppress("unused")
1415
package com.google.android.libraries.places.compose.autocomplete.data
1516

1617
import android.content.res.Resources
@@ -26,7 +27,7 @@ const val METERS_PER_FOOT = 3.28084
2627
const val METERS_PER_KILOMETER = 1_000
2728
const val FEET_PER_METER = 1 / METERS_PER_FOOT
2829
const val FEET_PER_MILE = 5_280
29-
const val MILES_PER_METER = 0.000621371
30+
const val MILES_PER_METER = 0.0006213712
3031

3132
/** A value class to wrap a value representing a measurement in meters. */
3233
@Immutable

places-compose/src/main/java/com/google/android/libraries/places/compose/autocomplete/domain/mappers/AddressMapper.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14+
15+
@file:Suppress("unused")
1416
package com.google.android.libraries.places.compose.autocomplete.domain.mappers
1517

1618
import android.util.Log

0 commit comments

Comments
 (0)