Go to the documentation of this file.00001
00011 #ifndef MATH_UTILITIES_H_
00012 #define MATH_UTILITIES_H_
00013
00014 #include <limits>
00015 #ifndef M_PI
00016
00017 #define M_PI 3.14159265
00018 #endif
00019
00025 template<typename T>
00026 inline bool isinf(T value)
00027 {
00028 return std::numeric_limits<T>::has_infinity && value == std::numeric_limits<T>::infinity();
00029 }
00030
00035 template<typename T>
00036 inline bool isnan(T value)
00037 {
00038 return value != value;
00039 }
00040
00041 #endif // MATH_UTILITIES_H_