2010-12-12 13:31:13 -03:00
|
|
|
#ifndef TOOLS_H_
|
|
|
|
#define TOOLS_H_
|
|
|
|
|
2011-06-14 13:53:19 -04:00
|
|
|
#define ABS(x) ( (x) >= (0) ? (x) : (-(x)) )
|
2011-03-14 18:19:21 -03:00
|
|
|
#define LIMIT(x, min, max) ( ((x) < (min)) ? (min) : ((x) > (max)) ? (max) : (x) )
|
2010-12-27 06:44:27 -03:00
|
|
|
#define ALIGN(x) (((x) + 3) & ~3)
|
|
|
|
#define ALIGN32(x) (((x) + 31) & ~31)
|
2010-12-12 13:31:13 -03:00
|
|
|
|
|
|
|
#endif
|