(svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed.

This commit is contained in:
rubidium
2007-12-25 09:48:53 +00:00
parent e2f79f0eb5
commit bf98e25e43
73 changed files with 144 additions and 101 deletions

View File

@@ -211,4 +211,16 @@ template<typename T> static inline bool IsInsideMM(const T x, const uint min, co
return (uint)(x - min) < (max - min);
}
/**
* Type safe swap operation
* @param a variable to swap with b
* @param b variable to swap with a
*/
template<typename T> void Swap(T& a, T& b)
{
T t = a;
a = b;
b = t;
}
#endif /* MATH_FUNC_HPP */