// $CVSHeader: pal8e/inc/nick.h,v 1.4 2005/02/15 02:43:50 indraneel Rel $

/* header file for nick.c */
#ifndef _NICK_H
#define _NICK_H

#define SWAP(a,b) {temp=(a);(a)=(b);(b)=temp;}
#define SWAPelmhes(g,h) {y=(g);(g)=(h);(h)=y;}
#define TINY 1.0e-20
#define RADIX 2.0
static double dsqrarg;
#define DSQR(a) ((dsqrarg=(a)) == 0.0 ? 0.0 : dsqrarg*dsqrarg)
#define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a))
#define fabslmy(a) ((a) < 0.0 ? -a : a)
#define SIGNL(a,b) ((b) >= 0.0 ? fabslmy(a) : -fabslmy(a))

#ifndef M_PI
#define M_PI    3.1415926
#endif



static double **dmatrix(long nrl, long nrh, long ncl, long nch);
static void free_dmatrix(double **m,long nrl,long nrh,long ncl,long nch);
static void eigensystem_symm(double **a, long n, double *eval,
			     double **evec, double *helper);
static void tred2(double **a, int n, double d[], double e[]);
static void tqli(double d[], double e[], int n, double **z);
static double dpythag(double a, double b);

static double angle_between_lines(double* xpoint1,double* xpoint2,
				  double* ypoint1,double* ypoint2);
static double measure_distance ( double ix, double iy, double iz,
				 double jx, double jy, double jz );
#endif /* _NICK_H */
