aboutsummaryrefslogtreecommitdiff
path: root/sys/mwcs/gen/mwc1trand.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /sys/mwcs/gen/mwc1trand.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/mwcs/gen/mwc1trand.x')
-rw-r--r--sys/mwcs/gen/mwc1trand.x24
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/mwcs/gen/mwc1trand.x b/sys/mwcs/gen/mwc1trand.x
new file mode 100644
index 00000000..af46e02d
--- /dev/null
+++ b/sys/mwcs/gen/mwc1trand.x
@@ -0,0 +1,24 @@
+include "../mwcs.h"
+
+# MW_C1TRAN -- Optimized 1D coordinate transformation.
+
+double procedure mw_c1trand (a_ct, x)
+
+pointer a_ct #I pointer to CTRAN descriptor
+double x #I coordinates in input system
+
+double y
+pointer ct
+
+begin
+ # Get real or double version of descriptor.
+ ct = CT_D(a_ct)
+
+ # Perform the transformation; LNR is a simple linear transformation.
+ if (CT_TYPE(ct) == LNR) {
+ return (Memd[CT_LTM(ct)] * x + Memd[CT_LTV(ct)])
+ } else {
+ call mw_ctrand (a_ct, x, y, 1)
+ return (y)
+ }
+end