diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-09-19 19:46:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-19 19:46:56 (GMT) |
commit | 7f08010fd631774084562ed14f0622968f3f9a92 (patch) | |
tree | 5f43d9d39c8fb6a1d7b3430051a4a14ac6f43ae5 | |
parent | c383650b64c994ae63e57aab6bb8cd193f8537da (diff) | |
parent | 1bf38a3a53aa39a7e690b67537fae691858a0645 (diff) | |
download | blt-7f08010fd631774084562ed14f0622968f3f9a92.zip blt-7f08010fd631774084562ed14f0622968f3f9a92.tar.gz blt-7f08010fd631774084562ed14f0622968f3f9a92.tar.bz2 |
Merge pull request #15 from prs-de/fix-negative-halo-distances
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); |