00001 /****************************************************************************** 00002 ** Copyright (C) 2007 Pablo Garcia 00003 ** 00004 ** This library is free software; you can redistribute it and/or 00005 ** modify it under the terms of the GNU Lesser General Public 00006 ** License as published by the Free Software Foundation; either 00007 ** version 2.1 of the License, or (at your option) any later version. 00008 00009 ** This library is distributed in the hope that it will be useful, 00010 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 ** Lesser General Public License for more details. 00013 00014 ** You should have received a copy of the GNU Lesser General Public 00015 ** License along with this library; if not, write to the Free Software 00016 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00017 ******************************************************************************/ 00018 00029 //----------------------------------------------------------------------------- 00030 // Define 00031 //----------------------------------------------------------------------------- 00032 #ifndef IQCONSTANTS_H 00033 #define IQCONSTANTS_H 00034 00035 // Select the global Q value to use: 00036 00038 #ifdef FIXED_POINT_LIB 00039 #ifndef GLOBAL_Q 00040 #define GLOBAL_Q 19 00041 #endif 00042 #define MATH_TYPE IQ_MATH 00043 #include "IQmathLib.h" 00044 #else 00045 #ifndef GLOBAL_Q 00046 #define GLOBAL_Q 19 00047 #endif 00048 #define MATH_TYPE FLOAT_MATH 00049 #include <math.h> 00050 #include "IQmathLib.h" 00051 /* PABLO: These operation are now included in IQmathLib.h when FLOAT_MATH flag is set 00052 (the same approach I used but for every operation in the library :-) ) 00053 // define here all needed operations and variables for float point operation 00054 typedef float _iq; 00055 #define _IQ(a) (a) 00056 #define _IQtoF(a) (a) 00057 #define _IQmpy(a,b) (a*b) 00058 #define _IQdiv(a,b) (a/b) 00059 #define _IQcos(a) (cos(a)) 00060 #define _IQsin(a) (sin(a)) 00061 */ 00062 #endif 00063 00064 #endif 00065 00066 //----------------------------------------------------------------------------- 00067 // End Of File 00068 //-----------------------------------------------------------------------------