Move sign function to maths.hpp
This commit is contained in:
parent
fe77bf9d7d
commit
af05331358
@ -127,4 +127,9 @@ max (const T &a , const T &b , const Args &...args )
|
|||||||
{ return max ( b > a ? b : a, 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
|
#endif // __MATHS_HPP
|
||||||
|
@ -161,9 +161,6 @@ struct fourcc {
|
|||||||
std::ostream& operator<< (std::ostream&, 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
|
#endif // __TYPES_HPP
|
||||||
|
Loading…
Reference in New Issue
Block a user