22 lines
754 B
C
22 lines
754 B
C
/*----------------------------------------------------------
|
|
* HTBLA-Leonding
|
|
* ---------------------------------------------------------
|
|
* Exercise Number: n/a
|
|
* Title: general.h
|
|
* Author: P. Bauer, S. Schraml
|
|
* ----------------------------------------------------------
|
|
* Description:
|
|
* General usable definitions and types.
|
|
* ----------------------------------------------------------
|
|
*/
|
|
#ifndef ___GENERAL_H
|
|
#define ___GENERAL_H
|
|
|
|
/** Convenience macro to get maximum of two numbers */
|
|
#define MAX(x, y) ((x) > (y) ? (x) : (y))
|
|
/** Convenience macro to get maximum of two numbers */
|
|
#define MIN(x, y) ((x) < (y) ? (x) : (y))
|
|
/** Convenience macro to get the absolute value of a number */
|
|
#define ABS(x) (x < 0 ? (-1*x) : (x))
|
|
|
|
#endif
|