00001 #pragma ident "$Id: MathBase.hpp 70 2006-08-01 18:36:21Z ehagen $" 00002 00003 00004 00010 #ifndef GPSTK_MATH_BASE_HPP 00011 #define GPSTK_MATH_BASE_HPP 00012 00013 //============================================================================ 00014 // 00015 // This file is part of GPSTk, the GPS Toolkit. 00016 // 00017 // The GPSTk is free software; you can redistribute it and/or modify 00018 // it under the terms of the GNU Lesser General Public License as published 00019 // by the Free Software Foundation; either version 2.1 of the License, or 00020 // any later version. 00021 // 00022 // The GPSTk is distributed in the hope that it will be useful, 00023 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00024 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00025 // GNU Lesser General Public License for more details. 00026 // 00027 // You should have received a copy of the GNU Lesser General Public 00028 // License along with GPSTk; if not, write to the Free Software Foundation, 00029 // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00030 // 00031 // Copyright 2004, The University of Texas at Austin 00032 // 00033 //============================================================================ 00034 00035 //@fix MSVC doesnt like std::sqrt or std::abs, and disabling 00036 //extensions allows abs(double) to be used instead of fabs() 00037 #ifdef _MSC_VER 00038 #undef _MSC_EXTENSIONS 00039 #endif 00040 #include <cmath> 00041 #ifdef _MSC_VER 00042 #define _MSC_EXTENSIONS 00043 #endif 00044 00045 namespace gpstk 00046 { 00047 // do Doxygen elsewhere 00048 #ifdef _MSC_VER 00049 #define ABS(x) ::abs(x) 00050 #define SQRT(x) ::sqrt(x) 00051 #else 00052 #define ABS(x) std::abs(x) 00053 #define SQRT(x) std::sqrt(x) 00054 #endif 00055 00056 } // namespace gpstk 00057 00058 #endif
1.3.9.1