public final class LatLngUtils
extends java.lang.Object
STOP! Do not modify this file. Changes will be overwritten during official grading.
| Modifier and Type | Method and Description |
|---|---|
static double |
distance(double oneLat,
double oneLng,
double anotherLat,
double anotherLng)
Computes the distance between two points.
|
static double |
distance(com.google.android.gms.maps.model.LatLng one,
com.google.android.gms.maps.model.LatLng another)
Computes the distance between two points represented as LatLngs.
|
static boolean |
same(double one,
double another)
Determines whether two location-related coordinates are similar enough to be considered the same.
|
static boolean |
same(double oneLat,
double oneLng,
double anotherLat,
double anotherLng)
Determines whether two points are similar enough to be considered the same spot.
|
static boolean |
same(com.google.android.gms.maps.model.LatLng one,
com.google.android.gms.maps.model.LatLng another)
Determines whether two points are similar enough to be considered the same spot.
|
public static double distance(double oneLat,
double oneLng,
double anotherLat,
double anotherLng)
oneLat - the latitude of one pointoneLng - the longitude of that pointanotherLat - the latitude of another pointanotherLng - the longitude of that other pointpublic static double distance(com.google.android.gms.maps.model.LatLng one,
com.google.android.gms.maps.model.LatLng another)
one - one latitude-longitude coordinate pairanother - the other latitude-longitude coordinate pairpublic static boolean same(double one,
double another)
one - a coordinate of one pointanother - the corresponding coordinate of the other pointpublic static boolean same(double oneLat,
double oneLng,
double anotherLat,
double anotherLng)
oneLat - the latitude of one pointoneLng - the longitude of that pointanotherLat - the latitude of another pointanotherLng - the longitude of that other pointpublic static boolean same(com.google.android.gms.maps.model.LatLng one,
com.google.android.gms.maps.model.LatLng another)
one - one pointanother - the other point