Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

phMath.h

Go to the documentation of this file.
00001 /* ---------------------------------------------------------------------------
00002     Phission : 
00003         Realtime Vision Processing System
00004 
00005     Copyright (C) 2003-2006 Philip D.S. Thoren (pthoren@cs.uml.edu)
00006     University of Massachusetts at Lowell,
00007     Laboratory for Artificial Intelligence and Robotics
00008 
00009     This file is part of Phission.
00010 
00011     Phission is free software; you can redistribute it and/or modify
00012     it under the terms of the GNU Lesser General Public License as published by
00013     the Free Software Foundation; either version 2 of the License, or
00014     (at your option) any later version.
00015 
00016     Phission is distributed in the hope that it will be useful,
00017     but WITHOUT ANY WARRANTY; without even the implied warranty of
00018     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019     GNU Lesser General Public License for more details.
00020 
00021     You should have received a copy of the GNU Lesser General Public License
00022     along with Phission; if not, write to the Free Software
00023     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024 
00025  ---------------------------------------------------------------------------*/
00026 #ifndef _PHMATH_H
00027 #define _PHMATH_H
00028 
00037 #if defined(HAVE_MATH_H)
00038     #include <math.h>
00039 #endif
00040 
00046 #ifndef M_PI
00047 
00051     #define M_PI 3.14159265358979323846
00052 #endif
00053 
00054 /* ------------------------------------------------------------------------ */
00055 /* Added for the blackfin */
00056 #if defined(bfin)
00057     #if !defined(round)
00058         #define round rint
00059     #endif 
00060 
00061     #if !defined(cosf)
00062         #define cosf cos
00063     #endif
00064 
00065     #if !defined(sinf)
00066         #define sinf sin
00067     #endif
00068 
00069     #if !defined(acosf)
00070         #define acosf acos
00071     #endif
00072 
00073     #if !defined(asinf)
00074         #define asinf asin
00075     #endif
00076 #endif /* #if defined(bfin) */
00077 
00078 #if defined(_MSC_VER) || defined(__ADSPBLACKFIN__)
00079     PHAPI(int) round( double x );
00080 #endif
00081 
00082 /* ------------------------------------------------------------------------ */
00083 /* When using MINGW (-mno-cygwin), srandom/random isn't defined */
00084 #ifndef srandom
00085     #define srandom srand
00086 #endif
00087 #ifndef random
00088     #define random rand
00089 #endif
00090  /* end \addtogroup Misc */
00092     
00093 #endif /* _PHMATH_H */




Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:44:02 2007 for phission by  doxygen 1.4.4