[SCM] Handle World Coordinate Systems in Astronomy branch, debian, updated. e02d283f02b99a78039c84ca50683d3405f1ce05

Ole Streicher debian at liska.ath.cx
Fri Feb 10 15:01:00 UTC 2012


The following commit has been merged in the debian branch:
commit e02d283f02b99a78039c84ca50683d3405f1ce05
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Fri Feb 10 16:00:22 2012 +0100

    Revert "Remove slalib's macro file"
    
    This reverts commit da331e7537a2f8cb31d7574084dbca72eeb0164e.
    
    This should be done when the upstream tar file is repackaged.

diff --git a/slamac.h b/slamac.h
new file mode 100644
index 0000000..8c7969a
--- /dev/null
+++ b/slamac.h
@@ -0,0 +1,110 @@
+#ifndef SLAMACHDEF
+#define SLAMACHDEF
+/*
+**  Author:
+**    Patrick Wallace  (ptw at tpsoft.demon.co.uk)
+**
+**  License:
+**    This program is free software; you can redistribute it and/or modify
+**    it under the terms of the GNU General Public License as published by
+**    the Free Software Foundation; either version 2 of the License, or
+**    (at your option) any later version.
+**
+**    This program is distributed in the hope that it will be useful,
+**    but WITHOUT ANY WARRANTY; without even the implied warranty of
+**    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+**    GNU General Public License for more details.
+**
+**    You should have received a copy of the GNU General Public License
+**    along with this program; if not, write to the Free Software
+**    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+**    USA.
+**
+**  Last revision:   16 October 2000
+*/
+
+/* max(A,B) - larger (most +ve) of two numbers (generic) */
+#define gmax(A,B) ((A)>(B)?(A):(B))
+
+/* min(A,B) - smaller (least +ve) of two numbers (generic) */
+#define gmin(A,B) ((A)<(B)?(A):(B))
+
+/* dint(A) - truncate to nearest whole number towards zero (double) */
+#define dint(A) ((A)<0.0?ceil(A):floor(A))
+
+/* aint(A) - truncate to nearest whole number towards zero (float) */
+#define aint(A) ((A)<0.0f?(float)ceil((double)(A)):(float)floor((double)(A)))
+
+/* dnint(A) - round to nearest whole number (double) */
+#define dnint(A) ((A)<0.0?ceil((A)-0.5):floor((A)+0.5))
+
+/* anint(A) - round to nearest whole number (float) */
+#define anint(A) ((float)dnint((double)(A)))
+
+/* dsign(A,B) - magnitude of A with sign of B (double) */
+#define dsign(A,B) ((B)<0.0?-(A):(A))
+
+/* dmod(A,B) - A modulo B (double) */
+#define dmod(A,B) ((B)!=0.0?((A)*(B)>0.0?(A)-(B)*floor((A)/(B))\
+                                        :(A)+(B)*floor(-(A)/(B))):(A))
+
+/* logicals */
+#if !defined(FALSE) || ((FALSE)!=0)
+#define FALSE 0
+#endif
+#if !defined(TRUE) || ((TRUE)!=1)
+#define TRUE 1
+#endif
+
+/* pi */
+#define DPI 3.1415926535897932384626433832795028841971693993751
+
+/* 2pi */
+#define D2PI 6.2831853071795864769252867665590057683943387987502
+
+/* 1/(2pi) */
+#define D1B2PI 0.15915494309189533576888376337251436203445964574046
+
+/* 4pi */
+#define D4PI 12.566370614359172953850573533118011536788677597500
+
+/* 1/(4pi) */
+#define D1B4PI 0.079577471545947667884441881686257181017229822870228
+
+/* pi^2 */
+#define DPISQ 9.8696044010893586188344909998761511353136994072408
+
+/* sqrt(pi) */
+#define DSQRPI 1.7724538509055160272981674833411451827975494561224
+
+/* pi/2:  90 degrees in radians */
+#define DPIBY2 1.5707963267948966192313216916397514420985846996876
+
+/* pi/180:  degrees to radians */
+#define DD2R 0.017453292519943295769236907684886127134428718885417
+
+/* 180/pi:  radians to degrees */
+#define DR2D 57.295779513082320876798154814105170332405472466564
+
+/* pi/(180*3600):  arcseconds to radians */
+#define DAS2R 4.8481368110953599358991410235794797595635330237270e-6
+
+/* 180*3600/pi :  radians to arcseconds */
+#define DR2AS 2.0626480624709635515647335733077861319665970087963e5
+
+/* pi/12:  hours to radians */
+#define DH2R 0.26179938779914943653855361527329190701643078328126
+
+/* 12/pi:  radians to hours */
+#define DR2H 3.8197186342054880584532103209403446888270314977709
+
+/* pi/(12*3600):  seconds of time to radians */
+#define DS2R 7.2722052166430399038487115353692196393452995355905e-5
+
+/* 12*3600/pi:  radians to seconds of time */
+#define DR2S 1.3750987083139757010431557155385240879777313391975e4
+
+/* 15/(2pi):  hours to degrees x radians to turns */
+#define D15B2P 2.3873241463784300365332564505877154305168946861068
+
+#endif

-- 
Handle World Coordinate Systems in Astronomy



More information about the debian-science-commits mailing list