X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Frasterize;a=blobdiff_plain;f=common.h;h=33961a196ec680ea61d3176573f2510e7c52c159;hp=537e135908d281d05af84a5c9da9337127615a00;hb=a3ba0121189f38132480b0c0c4be96df3c93900b;hpb=143da66e7f625b7f195a115b9740a748ee003534 diff --git a/common.h b/common.h index 537e135..33961a1 100644 --- a/common.h +++ b/common.h @@ -120,6 +120,16 @@ int imax(int a, int b) return a < b ? b : a; } +/* + * Define generic MIN and MAX macros. + */ +#ifndef MIN +#define MIN(A,B) (((A) < (B)) ? (A) : (B)) +#endif +#ifndef MAX +#define MAX(A,B) (((A) > (B)) ? (A) : (B)) +#endif + /* * Define some macros for packing and unpacking bytes to and from larger ints.