1 ////////////////////////////////////////////////////////////////////////////////
3 // Creation : 20/01/2000
4 // Author : Leonardo FLOREZ VALENCIA
5 // l-florez@uniandes.edu.co
6 // lflorez@creatis.insa-lyon.fr
7 // Copyright (C) 2000-2002 Leonardo FLOREZ VALENCIA
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License
11 // as published by the Free Software Foundation; either version 2
12 // of the License, or (at your option) any later version.
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU General Public License for more details.
19 // You should have received a copy of the GNU General Public License
20 // along with this program; if not, write to the Free Software
21 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 ////////////////////////////////////////////////////////////////////////////////
24 #ifndef GTMLIB__MATH__MATHDEFS__HXX
25 #define GTMLIB__MATH__MATHDEFS__HXX
30 #define GTM_PI 3.14159265359
32 #define GTM_PI2 6.28318530717
34 #define GTM_NE 2.71828182846
37 #define GTM_MIN( a, b ) ( ( ( a ) < ( b ) )? ( a ): ( b ) )
39 #define GTM_MAX( a, b ) ( ( ( a ) > ( b ) )? ( a ): ( b ) )
40 #define GTM_POW2( a ) ( ( a ) * ( a ) )
43 typedef unsigned char uchar;
44 typedef unsigned short ushort;
45 typedef unsigned int uint;
50 /** Rounds a double number.
55 double round( double n )
59 if ( ( n - tmp ) < 0.5 )
68 #endif // GTMLIB__MATH__MATHDEFS__HXX