From 2f9b7ba686c8ba763395fbc876a892cc9ea01fd4 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 30 Jul 2013 21:02:01 +0200 Subject: COMMON: Enforce formatting guidelines a bit more in util.h. --- common/util.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/util.h b/common/util.h index 4ca1c42929..392ced1ffe 100644 --- a/common/util.h +++ b/common/util.h @@ -41,10 +41,10 @@ #undef MAX #endif -template inline T ABS (T x) { return (x>=0) ? x : -x; } -template inline T MIN (T a, T b) { return (a inline T MAX (T a, T b) { return (a>b) ? a : b; } -template inline T CLIP (T v, T amin, T amax) +template inline T ABS(T x) { return (x >= 0) ? x : -x; } +template inline T MIN(T a, T b) { return (a < b) ? a : b; } +template inline T MAX(T a, T b) { return (a > b) ? a : b; } +template inline T CLIP(T v, T amin, T amax) { if (v < amin) return amin; else if (v > amax) return amax; else return v; } /** -- cgit v1.2.3