WCSLIB: wcsmath.h Source File

WCSLIB 8.9

Loading...
Searching...
No Matches
wcsmath.h
Go to the documentation of this file.
1/*============================================================================
2 WCSLIB 8.9 - an implementation of the FITS WCS standard.
3 Copyright (C) 1995-2026, Mark Calabretta
4
5 This file is part of WCSLIB.
6
7 WCSLIB is free software: you can redistribute it and/or modify it under the
8 terms of the GNU Lesser General Public License as published by the Free
9 Software Foundation, either version 3 of the License, or (at your option)
10 any later version.
11
12 WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
15 more details.
16
17 You should have received a copy of the GNU Lesser General Public License
18 along with WCSLIB. If not, see http://www.gnu.org/licenses.
19
20 Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
21 http://www.atnf.csiro.au/computing/software/wcs
22 $Id: wcsmath.h,v 8.9 2026/06/18 13:00:03 mcalabre Exp $
23*=============================================================================
24*
25* WCSLIB 8.9 - C routines that implement the FITS World Coordinate System
26* (WCS) standard. Refer to the README file provided with WCSLIB for an
27* overview of the library.
28*
29*
30* Summary of wcsmath.h
31* --------------------
32* Definition of mathematical constants used by WCSLIB.
33*
34*===========================================================================*/
35
36#ifndef WCSLIB_WCSMATH
37#define WCSLIB_WCSMATH
38
39#ifdef PI
40#undef PI
41#endif
42
43#ifdef D2R
44#undef D2R
45#endif
46
47#ifdef R2D
48#undef R2D
49#endif
50
51#ifdef SQRT2
52#undef SQRT2
53#endif
54
55#ifdef SQRT2INV
56#undef SQRT2INV
57#endif
58
59#define PI 3.141592653589793238462643
60#define D2R (PI/180.0)
61#define R2D (180.0/PI)
62#define SQRT2 1.4142135623730950488
63#define SQRT2INV (1.0/SQRT2)
64
65#ifdef UNDEFINED
66#undef UNDEFINED
67#endif
68
69#define UNDEFINED 987654321.0e99
70#define undefined(value) (value == UNDEFINED)
71
72#endif // WCSLIB_WCSMATH