as joozey said minv/maxv or:

#define min((a),(b)) ((a)<(b))?(a):(b)
#define max(a, b) ( (a)>(b) ? (a) : (b) )

(tough i'm not pretty sure if C-Lite supports "?" and ":" in macros)