Effective implementation of algorithms (Master Thesis)
Effective and error-free implementation of algorithms
|
00001 #ifndef H_GEOMETRY_TWO_D_SIGNUM 00002 #define H_GEOMETRY_TWO_D_SIGNUM 00003 00008 namespace geometry { 00009 namespace two_d { 00010 00011 template<typename T> 00012 int signum(T n) { 00013 if (n < 0) return -1; 00014 if (n > 0) return 1; 00015 return 0; 00016 }; 00017 00018 } // namespace two_d 00019 } // namespace geometry 00020 #endif