mirror of
https://github.com/BertoldVdb/ZoneDetect.git
synced 2026-03-25 08:45:56 +00:00
Update makefile and add margin to border detection to cover rounding
This commit is contained in:
parent
f52c8f4135
commit
2f1bfdebe2
2 changed files with 2 additions and 2 deletions
|
|
@ -66,7 +66,7 @@ obj/%.o: src/%.c $(INCLUDES_SRC)
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(OBJECTS_OBJ) $(EXECUTABLE)
|
rm -rf $(OBJECTS_OBJ) $(EXECUTABLE)
|
||||||
|
|
||||||
install:
|
install: $(EXECUTABLE)
|
||||||
install -m 0755 -d $(DESTDIR)$(includedir) $(DESTDIR)$(libdir)
|
install -m 0755 -d $(DESTDIR)$(includedir) $(DESTDIR)$(libdir)
|
||||||
install -m 0644 -t $(DESTDIR)$(includedir) zonedetect.h
|
install -m 0644 -t $(DESTDIR)$(includedir) zonedetect.h
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
|
|
|
||||||
|
|
@ -700,7 +700,7 @@ static ZDLookupResult ZDPointInPolygon(const ZoneDetect *library, uint32_t polyg
|
||||||
|
|
||||||
/* Check if the target is on the border */
|
/* Check if the target is on the border */
|
||||||
const int32_t intersectLon = (int32_t)(((float)latFixedPoint - b) / a);
|
const int32_t intersectLon = (int32_t)(((float)latFixedPoint - b) / a);
|
||||||
if(intersectLon == lonFixedPoint) {
|
if(intersectLon >= lonFixedPoint-1 && intersectLon <= lonFixedPoint+1) {
|
||||||
if(distanceSqrMin) *distanceSqrMin = 0;
|
if(distanceSqrMin) *distanceSqrMin = 0;
|
||||||
return ZD_LOOKUP_ON_BORDER_SEGMENT;
|
return ZD_LOOKUP_ON_BORDER_SEGMENT;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue