#ifndef REALNUMBER_H
#define REALNUMBER_H
 
/* Comment in one of the following two lines.  float is slightly faster, slightly less accurate. 
At present (2/25/00), float barely seems to gain enough speed to be worth using.
Note that to use the Real type throughout my program, I have to always remember
to include realnumber.h*/
#define USEFLOAT
#ifdef USEFLOAT
	typedef float Real; 
#else //not USEFLOAT
	typedef double Real; 
#endif //USEFLOAT

/* When I use a float Real, I'll get warning messages generated by the fact that constants like 2.0
are viewed as doubles, so that if x is a float, the line x = x/2.0 would be viewed as converting
a double to a float.  These messages take this form:
warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
warning C4305: '=' : truncation from 'const double' to 'float'
I can disable these warning messages with a pragma stating the two warning numbers. */
#pragma warning(disable: 4305 4244)
#define PI 3.14159265358979
#define CLAMP(x,lo,hi) (x)=(((x)<(lo))?(lo):(((x)>(hi))?(hi):(x)))
#define SMALL_REAL 0.00001
#define BIG_REAL 1000000000.0
 
#endif //REALNUMBER_H 
