diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-07-25 17:57:16 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-07-25 17:57:16 (GMT) |
commit | 5568b6613715e557903558c1e5ee99dbecbc9336 (patch) | |
tree | 19da347eb3f139ac59937916f37db07e610828c1 | |
parent | 8a8d15275a15fbdb49d7877b4461697820a2b020 (diff) | |
download | blt-5568b6613715e557903558c1e5ee99dbecbc9336.zip blt-5568b6613715e557903558c1e5ee99dbecbc9336.tar.gz blt-5568b6613715e557903558c1e5ee99dbecbc9336.tar.bz2 |
simplify code
-rw-r--r-- | tksao/frame/fitsmap.C | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tksao/frame/fitsmap.C b/tksao/frame/fitsmap.C index 97f714e..e1cc229 100644 --- a/tksao/frame/fitsmap.C +++ b/tksao/frame/fitsmap.C @@ -459,18 +459,20 @@ double FitsImage::mapDistFromRef(const Vector& vv1, const Vector& vv2, Vector v1 = pix2wcs(vv1 * refToImage, sys, Coord::FK5); Vector v2 = pix2wcs(vv2 * refToImage, sys, Coord::FK5); + double rr = getWCSDist(v1,v2,sys); if (hasWCSCel(sys)) { switch (dist) { case Coord::DEGREE: - return getWCSDist(v1,v2,sys); + break; case Coord::ARCMIN: - return getWCSDist(v1,v2,sys)*60; + rr *= 60; + break; case Coord::ARCSEC: - return getWCSDist(v1,v2,sys)*60*60; + rr *= 60*60; + break; } } - else - return getWCSDist(v1,v2,sys); + return rr; } } |