summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-09-19 19:46:56 (GMT)
committerGitHub <noreply@github.com>2018-09-19 19:46:56 (GMT)
commit7f08010fd631774084562ed14f0622968f3f9a92 (patch)
tree5f43d9d39c8fb6a1d7b3430051a4a14ac6f43ae5
parentc383650b64c994ae63e57aab6bb8cd193f8537da (diff)
parent1bf38a3a53aa39a7e690b67537fae691858a0645 (diff)
downloadblt-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.C4
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);