diff options
author | Parveen Kumar Yadav <parveenkumardeeva@gmail.com> | 2018-04-13 10:47:42 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-13 10:47:42 +0530 |
commit | d448823edd0e8a7833c79b980cfe9778b849843a (patch) | |
tree | 50ad1ab51b93915cff422a1834baa5a2c579fce8 /src/org/traccar/geofence/GeofenceCircle.java | |
parent | 2c8392a0e16044905d983da56ab0919eadbb3858 (diff) | |
parent | 617393cf9f052298f7fb35f0c58138c87a6dd5c3 (diff) | |
download | trackermap-server-d448823edd0e8a7833c79b980cfe9778b849843a.tar.gz trackermap-server-d448823edd0e8a7833c79b980cfe9778b849843a.tar.bz2 trackermap-server-d448823edd0e8a7833c79b980cfe9778b849843a.zip |
Merge pull request #1 from traccar/master
Bringing Fork Up to Date
Diffstat (limited to 'src/org/traccar/geofence/GeofenceCircle.java')
-rw-r--r-- | src/org/traccar/geofence/GeofenceCircle.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/geofence/GeofenceCircle.java b/src/org/traccar/geofence/GeofenceCircle.java index d78734714..f6fca63ca 100644 --- a/src/org/traccar/geofence/GeofenceCircle.java +++ b/src/org/traccar/geofence/GeofenceCircle.java @@ -39,9 +39,13 @@ public class GeofenceCircle extends GeofenceGeometry { this.radius = radius; } + public double distanceFromCenter(double latitude, double longitude) { + return DistanceCalculator.distance(centerLatitude, centerLongitude, latitude, longitude); + } + @Override public boolean containsPoint(double latitude, double longitude) { - return DistanceCalculator.distance(centerLatitude, centerLongitude, latitude, longitude) <= radius; + return distanceFromCenter(latitude, longitude) <= radius; } @Override |