Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

LatLng.wrap should return a new instance of LatLng #10769

Merged
merged 1 commit into from
Dec 21, 2017
Merged

Conversation

osana
Copy link
Contributor

@osana osana commented Dec 20, 2017

LatLng.wrap should wrap multiples of max value to max

closes #10767

@osana osana added the Android Mapbox Maps SDK for Android label Dec 20, 2017
@osana osana added this to the android-v6.0.0 milestone Dec 20, 2017
LatLng.wrap shoudl wrap mulpiples of max value to max
Copy link
Contributor

@asheemmamoowala asheemmamoowala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should also be in core so we have the same behavior for LatLng for all APIs.

assertEquals("longitude wrapped max value", newLatlng.getLongitude(), 180.0, DELTA);

newLatlng = new LatLng(45.0, -180.0).wrap();
assertEquals("longitude wrapped min value", newLatlng.getLongitude(), -180.0, DELTA);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For completeness, can we add a test for longitude >180

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LatLng.wrap() should not wrap max longitude to min value
2 participants