diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-09-19 19:52:47 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-09-19 19:52:47 (GMT) |
commit | e6690c390bf8cecad8d63bf54c9c62751e6de50c (patch) | |
tree | 841039426e119924a5b161193a939e3ad4019312 /tkblt | |
parent | a2e0fe96764782a9d2757696b291be9e76ce246f (diff) | |
parent | 2672b9394d527ea997f9de4415b4defed20e4cb9 (diff) | |
download | blt-e6690c390bf8cecad8d63bf54c9c62751e6de50c.zip blt-e6690c390bf8cecad8d63bf54c9c62751e6de50c.tar.gz blt-e6690c390bf8cecad8d63bf54c9c62751e6de50c.tar.bz2 |
Merge commit '2672b9394d527ea997f9de4415b4defed20e4cb9'
Diffstat (limited to 'tkblt')
-rw-r--r-- | tkblt/generic/tkbltGrElemLine.C | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tkblt/generic/tkbltGrElemLine.C b/tkblt/generic/tkbltGrElemLine.C index ac2b340..19a572e 100644 --- a/tkblt/generic/tkbltGrElemLine.C +++ b/tkblt/generic/tkbltGrElemLine.C @@ -1728,7 +1728,7 @@ void LineElement::mapErrorBars(LineStyle **styleMap) if ((isfinite(x)) && (isfinite(y))) { double high; double low; - if (ops->xError->nValues() > 0) { + if (ops->xError && ops->xError->nValues() > 0) { high = x + ops->xError->values_[ii]; low = x - ops->xError->values_[ii]; } @@ -1795,7 +1795,7 @@ void LineElement::mapErrorBars(LineStyle **styleMap) if ((isfinite(x)) && (isfinite(y))) { double high; double low; - if (ops->yError->nValues() > 0) { + if (ops->yError && ops->yError->nValues() > 0) { high = y + ops->yError->values_[ii]; low = y - ops->yError->values_[ii]; } @@ -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); |