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:
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:
Here's the helper method: