19 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
* $Id: global.h,v 1.27 2010-11-28 15:18:21 Isibaar Exp $ |
* $Id$ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
81 |
|
|
82 |
typedef struct |
typedef struct |
83 |
{ |
{ |
84 |
VECTOR duv[3]; |
VECTOR duv[4]; |
85 |
} |
} |
86 |
WARPPOINTS; |
WARPPOINTS; |
87 |
|
|
251 |
|
|
252 |
/* useful macros */ |
/* useful macros */ |
253 |
|
|
254 |
|
#ifndef MIN |
255 |
#define MIN(X, Y) ((X)<(Y)?(X):(Y)) |
#define MIN(X, Y) ((X)<(Y)?(X):(Y)) |
256 |
|
#endif |
257 |
|
#ifndef MAX |
258 |
#define MAX(X, Y) ((X)>(Y)?(X):(Y)) |
#define MAX(X, Y) ((X)>(Y)?(X):(Y)) |
259 |
|
#endif |
260 |
/* #define ABS(X) (((X)>0)?(X):-(X)) */ |
/* #define ABS(X) (((X)>0)?(X):-(X)) */ |
261 |
#define SIGN(X) (((X)>0)?1:-1) |
#define SIGN(X) (((X)>0)?1:-1) |
262 |
#define CLIP(X,AMIN,AMAX) (((X)<(AMIN)) ? (AMIN) : ((X)>(AMAX)) ? (AMAX) : (X)) |
#define CLIP(X,AMIN,AMAX) (((X)<(AMIN)) ? (AMIN) : ((X)>(AMAX)) ? (AMAX) : (X)) |