diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /pkg/images/tv/tvmark/mknew.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/images/tv/tvmark/mknew.x')
-rw-r--r-- | pkg/images/tv/tvmark/mknew.x | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkg/images/tv/tvmark/mknew.x b/pkg/images/tv/tvmark/mknew.x new file mode 100644 index 00000000..27a5a3af --- /dev/null +++ b/pkg/images/tv/tvmark/mknew.x @@ -0,0 +1,42 @@ +# MK_NEW -- Procedure to determine whether the current star is the same as +# the previous star and/or whether the current star belongs to the coordinate +# list or not. + +int procedure mk_new (wx, wy, owx, owy, xlist, ylist, newlist) + +real wx # x cursor coordinate +real wy # y cursor coordinate +real owx # old x cursor coordinate +real owy # old y cursor coordinate +real xlist # x list coordinate +real ylist # y list coordinate +int newlist # integer new list + +int newobject +real deltaxy +bool fp_equalr() + +begin + deltaxy = 1.0 + + if (newlist == NO) { + if (! fp_equalr (wx, owx) || ! fp_equalr (wy, owy)) + newobject = YES + else + newobject = NO + } else if ((abs (xlist - wx) <= deltaxy) && + (abs (ylist - wy) <= deltaxy)) { + wx = xlist + wy = ylist + newobject = NO + } else if (fp_equalr (wx, owx) && fp_equalr (wy, owy)) { + wx = xlist + wy = ylist + newobject = NO + } else { + newlist = NO + newobject = YES + } + + return (newobject) +end |