orsa_common.h

Go to the documentation of this file.
00001 /* 
00002    ORSA - Orbit Reconstruction, Simulation and Analysis
00003    Copyright (C) 2002-2004 Pasquale Tricarico
00004    
00005    This program is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU General Public License
00007    as published by the Free Software Foundation; either version 2
00008    of the License, or (at your option) any later version.
00009    
00010    As a special exception, Pasquale Tricarico gives permission to
00011    link this program with Qt commercial edition, and distribute the
00012    resulting executable, without including the source code for the Qt
00013    commercial edition in the source distribution.
00014    
00015    This program is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018    GNU General Public License for more details.
00019    
00020    You should have received a copy of the GNU General Public License
00021    along with this program; if not, write to the Free Software
00022    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 */
00024 
00025 #ifndef _ORSA_COMMON_H_
00026 #define _ORSA_COMMON_H_
00027 
00028 // #include "orsa_units.h"
00029 
00030 #ifdef PI
00031 #undef PI
00032 #endif
00033 #define PI  3.1415926535897932384626433832795029L  /* long double constant, thanks to the trailing L */
00034 
00035 #define MAX(a, b)      ((b) < (a) ? (a) : (b))
00036 #define MIN(a, b)      ((a) < (b) ? (a) : (b))
00037 #define ABS(a)         ((a) >= 0  ? (a) : -(a))
00038 
00039 namespace orsa {
00040 
00041   #if defined(__BORLANDC__)
00042   #if (__BORLANDC__ <= 0x0564)
00043   #pragma option -w-8080
00044   // otherwise we get bogus warnings for constants below
00045   #endif
00046   #endif
00047   const double halfpi = PI/2;
00048   const double pi     = PI;
00049   const double twopi  = PI+PI;
00050   const double pisq   = PI*PI;
00051   
00052   // world visible units // defined in orsa_universe.cc
00053   // extern Units units;
00054   
00055 } // namespace orsa
00056 
00057 #endif // _ORSA_COMMON_H_

Generated on Wed May 30 13:04:52 2007 for liborsa by  doxygen 1.5.2