Move sign function to maths.hpp

This commit is contained in:
Danny Robson 2012-04-13 11:23:55 +10:00
parent fe77bf9d7d
commit af05331358
2 changed files with 5 additions and 3 deletions

View File

@ -127,4 +127,9 @@ max (const T &a , const T &b , const Args &...args )
{ return max ( b > a ? b : a, args...); }
inline double sign (double x) { return x >= 0 ? 1.0 : -1.0; }
inline float sign (float x) { return x >= 0 ? 1.0 : -1.0; }
inline int sign (int x) { return x >= 0 ? 1 : -1 ; }
#endif // __MATHS_HPP

View File

@ -161,9 +161,6 @@ struct fourcc {
std::ostream& operator<< (std::ostream&, fourcc);
inline double sign (double x) { return x >= 0 ? 1.0 : -1.0; }
inline float sign (float x) { return x >= 0 ? 1.0 : -1.0; }
inline int sign (int x) { return x >= 0 ? 1 : -1 ; }
#endif // __TYPES_HPP