Skip to content

Conversation

tedder
Copy link

@tedder tedder commented Apr 12, 2016

First, apologies because I'm not equipped to test this, nor am I sure it's correct, but I hope it's close.

The idea is to create a helper method for gps.location.distanceBetween(). That way the object's location can be used instead of needing to pass it back in:

gps.distanceBetween(otherLat, otherLng, gps.location.lat(), gps.location.lng())

Here's the helper method:

gps.location.distanceBetween(otherLat, otherLng)

First, apologies because I'm not equipped to test this, nor am I sure it's correct, but I hope it's close.

The idea is to create a helper method for gps.location.distanceBetween(). That way the object's location can be used instead of needing to pass it back in:

    gps.distanceBetween(otherLat, otherLng, gps.location.lat(), gps.location.lng())

Here's the helper method:

    gps.location.distanceBetween(otherLat, otherLng)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant