From: Włodzimierz Skiba Date: Fri, 5 May 2006 17:28:33 +0000 (+0000) Subject: Helper for clipping to range. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e8ee8f271646b5550784d587ef4f069ae680e33a Helper for clipping to range. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/utils.h b/include/wx/utils.h index f5d087d385..9f7031537a 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -54,6 +54,7 @@ class WXDLLIMPEXP_CORE wxWindowList; #define wxMax(a,b) (((a) > (b)) ? (a) : (b)) #define wxMin(a,b) (((a) < (b)) ? (a) : (b)) +#define wxClip(a,b,c) (((a) < (b)) ? (b) : (((a) > (c)) ? (c) : (a))) // wxGetFreeMemory can return huge amount of memory on 32-bit platforms as well // so to always use long long for its result type on all platforms which