Randy Mackay
614b0f6dc8
AP_Math: Polygon_intersects handles unclosed polygons
6 years ago
Randy Mackay
071e340827
AP_Math: Polygon_closest_distance_line returns neg numbers
...
value is negative distance from intersection to p2
6 years ago
Andrew Tridgell
6eb816fd3b
AP_Math: add Polygon_closest_distance_line
...
Also add optimisations
6 years ago
Peter Barker
36fe9a18a0
AP_Math: make Polygon_outside cope with being passed unclosed polygons
6 years ago
Peter Barker
51a0401383
AP_Math: correct Polygon_outside floating point instatiation
...
This routine was entemplatificated from the integer version, which was
designed to be perfect across representable ranges of points. The
floating point version suffered from a rounding problem.
6 years ago
Peter Barker
f09efe0908
AP_Math: correct URL for Polygon_outside algorithm
6 years ago
Peter Barker
b22d3a0103
AP_Math: avoid casting floats to int32's for temporary variables
...
Note the use of 64-bit integer arithmetic further down, however
6 years ago
khancyr
15398f8b0e
AP_Math: correct variable init and remove define in polygon
8 years ago
Pierre Kancir
6bf1322633
AP_Math: polygon.cpp correct float comparison
8 years ago
Mathieu OTHACEHE
152edf7189
Global: remove mode line from headers
...
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
8 years ago
Daniel Ricketts
249d95b413
AP_Math: add Polygon_outside and Polygon_complete functions
9 years ago
uncrustify
b5bee9deff
uncrustify libraries/AP_Math/polygon.cpp
13 years ago
Andrew Tridgell
11b8d56434
added comment in polygon code
13 years ago
Andrew Tridgell
6efa2e53cb
AP_Math: re-work polygon algorithm for perfect precision
...
using sign checking and 64 bit integer math only when needed results
in an algorithm that is just as fast as the floating point version,
but has perfect results for any representable lat/lng
13 years ago
Andrew Tridgell
a3a0e5646f
polygon: improve the speed and precision of the polygon algorithm
...
now takes 156 usec per test, with a 11 point boundary
13 years ago
Andrew Tridgell
42522baf9f
geofence: store fence points as int32_t
...
this keeps maximum precision in fence boundaries
13 years ago
Andrew Tridgell
9b6bab8904
AP_Math: better polygon algorithm
...
this one seems to do better with single precision floating point
13 years ago
Andrew Tridgell
85e295332f
AP_Math: added Polygon_complete() function
...
used to veryify user supplied boundaries
13 years ago
Andrew Tridgell
117a98f9a2
AP_Math: added a Polygon_outside() function
...
this tests if a point is outside of a polygon. This will be used as
part of our geo-fencing support, and also for a new 'fenced mode'
13 years ago