1
0
mirror of https://github.com/elua/elua.git synced 2025-01-08 20:56:17 +08:00
elua/inc/utils.h

14 lines
376 B
C
Raw Normal View History

2008-08-19 20:21:10 +00:00
// General purpose function/macros
2008-07-29 11:08:54 +00:00
#ifndef __UTILS_H__
#define __UTILS_H__
#define ABSDIFF( x, y ) ( ( x ) >= ( y ) ? ( x ) - ( y ) : ( y ) - ( x ) )
#define UMIN( x, y ) ( ( x ) <= ( y ) ? ( x ) : ( y ) )
#define UMAX( x, y ) ( ( x ) >= ( y ) ? ( x ) : ( y ) )
#define UABS( x ) ( ( x ) >= 0 ? ( x ) : -( x ) )
#define STD_CTRLZ_CODE 26
2008-07-29 11:08:54 +00:00
#endif