From 5298bdefd7f7875ae8b7cb6c9201e3321af62011 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 30 May 2018 08:22:30 +0800 Subject: =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=9B=9E=E8=B0=83=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/math/math.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libjin/math/math.h') diff --git a/src/libjin/math/math.h b/src/libjin/math/math.h index f6a299e..849f74b 100644 --- a/src/libjin/math/math.h +++ b/src/libjin/math/math.h @@ -7,9 +7,9 @@ #include "matrix.h" #include "quad.h" -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#define clamp(a, mi,ma) min(max(a,mi),ma) +#define min(a,b) (a < b ? a : b) +#define max(a,b) (a > b ? a : b) +#define clamp(a, mi,ma) (min(max(a,mi),ma)) #define within(a,min,max) (a >= min && a <= max) #define without(a,min,max) (a < min || a > max) -- cgit v1.1-26-g67d0