1
0
Fork 0
flightgear/Lib/Math/mat3defs.h

57 lines
1.4 KiB
C
Raw Normal View History

1997-05-30 19:25:54 +00:00
/* Copyright 1988, Brown Computer Graphics Group. All Rights Reserved. */
1998-04-21 17:03:45 +00:00
#ifndef _MAT3DEFS_H
#define _MAT3DEFS_H
#ifdef __cplusplus
extern "C" {
#endif
1997-05-30 19:25:54 +00:00
#include <stdio.h>
/* #include <Math/mat3err.h> */
#include <Math/mat3.h>
1997-05-30 19:25:54 +00:00
/* ----------------------------- Constants ------------------------------ */
#define FALSE 0
#define TRUE 1
#define CNULL ((char *) NULL)
/* ------------------------------ Macros -------------------------------- */
#define ALLOCN(P,T,N,M) \
if ((P = (T *) malloc((unsigned) (N) * sizeof(T))) == NULL) \
ERR_ERROR(MAT3_errid, ERR_FATAL, (ERR_ALLOC1, M)); \
else
#define FREE(P) free((char *) (P))
#define ABS(A) ((A) > 0 ? (A) : -(A))
#define MIN(A,B) ((A) < (B) ? (A) : (B))
#define MAX(A,B) ((A) > (B) ? (A) : (B))
#define SWAP(A,B,T) (T = A, A = B, B = T)
/* Is N within EPS of zero ? */
#define IS_ZERO(N,EPS) ((N) < EPS && (N) > -EPS)
/* Macros for lu routines */
#define LU_PERMUTE(p,i,j) { int LU_T; LU_T = p[i]; p[i] = p[j]; p[j] = LU_T; }
/* ------------------------- Internal Entries ---------------------------- */
/* ------------------------- Global Variables ---------------------------- */
/* extern ERRid *MAT3_errid; */
1998-04-21 17:03:45 +00:00
#ifdef __cplusplus
}
#endif
#endif /* _MAT3DEFS_H */