vtf-logo

constants.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00008 #if !defined(__numerical_constants_h__)
00009 #define __numerical_constants_h__
00010 
00011 #include "constants/Exponentiation.h"
00012 #include "constants/Logarithm.h"
00013 
00014 BEGIN_NAMESPACE_NUMERICAL
00015 
00016 
00028 
00029 template<typename T>
00030 struct Constants;
00031 
00033 template<>
00034 struct Constants<double> {
00035 
00037   static
00038   double
00039   Pi() {
00040     return 3.1415926535897932384626433832795;
00041   }
00042 
00044   static
00045   double
00046   E() {
00047     return 2.7182818284590452353602874713527;
00048   }
00049 
00051   static
00052   double
00053   Degree() {
00054     return 0.017453292519943295769236907684886;
00055   }
00056 };
00057 
00058 
00060 template<>
00061 struct Constants<float> {
00062 
00064   static
00065   float
00066   Pi() {
00067     return 3.1415926535897932384626433832795f;
00068   }
00069 
00071   static
00072   float
00073   E() {
00074     return 2.7182818284590452353602874713527f;
00075   }
00076 
00078   static
00079   float
00080   Degree() {
00081     return 0.017453292519943295769236907684886f;
00082   }
00083 };
00084 
00085 
00086 END_NAMESPACE_NUMERICAL
00087 
00088 #endif

Generated on Fri Aug 24 12:56:05 2007 for Numerical Algorithms Package by  doxygen 1.4.7