From 3364c2c20edae768aa53a623aa78b95d48c11bc7 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 21 Aug 2002 21:47:36 +0000 Subject: [PATCH] Add templated swap(). --- stepmania/src/RageUtil.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stepmania/src/RageUtil.h b/stepmania/src/RageUtil.h index fbbce23096..7d6bf74b3d 100644 --- a/stepmania/src/RageUtil.h +++ b/stepmania/src/RageUtil.h @@ -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 +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)