diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/mwcs/gen/mwc1tranr.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/mwcs/gen/mwc1tranr.x')
-rw-r--r-- | sys/mwcs/gen/mwc1tranr.x | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/mwcs/gen/mwc1tranr.x b/sys/mwcs/gen/mwc1tranr.x new file mode 100644 index 00000000..06ad0bf7 --- /dev/null +++ b/sys/mwcs/gen/mwc1tranr.x @@ -0,0 +1,24 @@ +include "../mwcs.h" + +# MW_C1TRAN -- Optimized 1D coordinate transformation. + +real procedure mw_c1tranr (a_ct, x) + +pointer a_ct #I pointer to CTRAN descriptor +real x #I coordinates in input system + +real y +pointer ct + +begin + # Get real or double version of descriptor. + ct = CT_R(a_ct) + + # Perform the transformation; LNR is a simple linear transformation. + if (CT_TYPE(ct) == LNR) { + return (Memr[CT_LTM(ct)] * x + Memr[CT_LTV(ct)]) + } else { + call mw_ctranr (a_ct, x, y, 1) + return (y) + } +end |