#ifndef IGL_EPS_H #define IGL_EPS_H // Define a standard value for double epsilon namespace igl { const double DOUBLE_EPS = 1.0e-14; const double DOUBLE_EPS_SQ = 1.0e-28; const float FLOAT_EPS = 1.0e-7; const float FLOAT_EPS_SQ = 1.0e-14; // Function returning EPS for corresponding type template inline S_type EPS(); // Template specializations for float and double template <> inline float EPS(); template <> inline double EPS(); } // Implementation template <> inline float igl::EPS() { return igl::FLOAT_EPS; } template <> inline double igl::EPS() { return igl::DOUBLE_EPS; } #endif