From c216c0cb7ecbcefe6108c72f45338bd84b348e2e Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Tue, 26 Jun 2018 15:27:53 +0300 Subject: [PATCH] add MIN and MAX macros because we could use min/max for intergers too. it may not guarantee that MIN and MAX macros will always be defined by compiler --- include/cglm/util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/cglm/util.h b/include/cglm/util.h index 7a7b004..d1929f2 100644 --- a/include/cglm/util.h +++ b/include/cglm/util.h @@ -21,6 +21,9 @@ #include "common.h" #include +#define GLM_MIN(X, Y) (((X) < (Y)) ? (X) : (Y)) +#define GLM_MAX(X, Y) (((X) > (Y)) ? (X) : (Y)) + /*! * @brief get sign of 32 bit integer as +1, -1, 0 *