aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/geofence/GeofencePolyline.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/geofence/GeofencePolyline.java')
-rw-r--r--src/org/traccar/geofence/GeofencePolyline.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/org/traccar/geofence/GeofencePolyline.java b/src/org/traccar/geofence/GeofencePolyline.java
index cadc69da6..d84f512e3 100644
--- a/src/org/traccar/geofence/GeofencePolyline.java
+++ b/src/org/traccar/geofence/GeofencePolyline.java
@@ -36,11 +36,10 @@ public class GeofencePolyline extends GeofenceGeometry {
@Override
public boolean containsPoint(double latitude, double longitude) {
- double longitude360 = longitude + Coordinate.DEGREE360;
for (int i = 1; i < coordinates.size(); i++) {
if (DistanceCalculator.distanceToLine(
- latitude, longitude360, coordinates.get(i - 1).getLat(), coordinates.get(i - 1).getLon360(),
- coordinates.get(i).getLat(), coordinates.get(i).getLon360()) <= distance) {
+ latitude, longitude, coordinates.get(i - 1).getLat(), coordinates.get(i - 1).getLon(),
+ coordinates.get(i).getLat(), coordinates.get(i).getLon()) <= distance) {
return true;
}
}