diff options
author | Adrián Medraño Calvo <adrian@medranocalvo.com> | 2018-09-11 12:00:00 (GMT) |
---|---|---|
committer | Adrián Medraño Calvo <adrian@medranocalvo.com> | 2018-09-11 12:00:00 (GMT) |
commit | 1bf38a3a53aa39a7e690b67537fae691858a0645 (patch) | |
tree | 5f43d9d39c8fb6a1d7b3430051a4a14ac6f43ae5 | |
parent | c383650b64c994ae63e57aab6bb8cd193f8537da (diff) | |
download | blt-1bf38a3a53aa39a7e690b67537fae691858a0645.zip blt-1bf38a3a53aa39a7e690b67537fae691858a0645.tar.gz blt-1bf38a3a53aa39a7e690b67537fae691858a0645.tar.bz2 |
Halo distances must be absolute values
-rw-r--r-- | generic/tkbltGrElemLine.C | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkbltGrElemLine.C b/generic/tkbltGrElemLine.C index ac2b340..7b0d2d4 100644 --- a/generic/tkbltGrElemLine.C +++ b/generic/tkbltGrElemLine.C @@ -1898,8 +1898,8 @@ void LineElement::closestPoint(ClosestSearch *searchPtr) int count =0; for (Point2d *pp = symbolPts_.points; count < symbolPts_.length; count++, pp++) { - double dx = (double)(searchPtr->x - pp->x); - double dy = (double)(searchPtr->y - pp->y); + double dx = (double)abs(searchPtr->x - pp->x); + double dy = (double)abs(searchPtr->y - pp->y); double d; if (searchPtr->along == SEARCH_BOTH) d = hypot(dx, dy); |