Add templated swap().

This commit is contained in:
Glenn Maynard
2002-08-21 21:47:36 +00:00
parent 7c905e971c
commit 3364c2c20e
+3
View File
@@ -54,6 +54,9 @@ inline float max(int a, float b) { return a > b? a:b; }
#define clamp(val,low,high) ( max( (low), min((val),(high)) ) )
template <class T>
void swap(T &a, T &b) { T c = a; a = b; b = c; }
#define PI D3DX_PI
#define DEG (PI / 180.0f)
#define RAD (180.0f / PI)