From 288842f199cee5990828cb57b0b1496084161394 Mon Sep 17 00:00:00 2001 From: tsauerbeck Date: Wed, 3 Nov 2004 19:23:18 +0000 Subject: [PATCH] added ABS and CLAMP macros SVN revision: 12139 --- legacy/ecore/src/lib/ecore/Ecore.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/legacy/ecore/src/lib/ecore/Ecore.h b/legacy/ecore/src/lib/ecore/Ecore.h index 01360171ec..4d57c1f30c 100644 --- a/legacy/ecore/src/lib/ecore/Ecore.h +++ b/legacy/ecore/src/lib/ecore/Ecore.h @@ -61,6 +61,14 @@ extern "C" { #define MAX(x, y) (((x) > (y)) ? (x) : (y)) #endif +#ifndef ABS +#define ABS(x) ((x) < 0 ? -(x) : (x)) +#endif + +#ifndef CLAMP +#define CLAMP(x, min, max) (((x) > (max)) ? (max) : (((x) < (min)) ? (min) : (x))) +#endif + #define ECORE_EVENT_NONE 0 #define ECORE_EVENT_EXE_EXIT 1 /**< Spawned Exe has exit event */ #define ECORE_EVENT_SIGNAL_USER 2 /**< User signal event */