home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / graphtal / globals.h < prev    next >
C/C++ Source or Header  |  1992-10-19  |  1KB  |  47 lines

  1. /*
  2.  * Globals.h - global definitions.
  3.  *
  4.  * Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  */
  17.  
  18. #ifndef GLOBALS_H
  19. # define GLOBALS_H
  20.  
  21. #include <math.h>
  22. #include "rcString.h"
  23.  
  24. #define CPP_NAME "/usr/lib/cpp"
  25.  
  26. // Name of color file.
  27. #define defaultColorFile  "colors.def"
  28.  
  29. // Name of environment variable, which indicates the location and the name
  30. // of the color file.
  31. #define COLOR_ENV  "COLORFILE"
  32.  
  33. extern "C" void srand48(long);
  34. extern "C" double drand48();
  35.  
  36. typedef double real;
  37. //typedef float real;
  38.  
  39. const real EPSILON = 0.00001;
  40.  
  41. typedef void* anyPtr;
  42. inline real dtor(real degree) { return degree*M_PI/180.0; }
  43. inline real rtod(real rad)    { return rad*180.0/M_PI; }
  44. inline int  equal(real a, real b) { return fabs(a-b) < 0.000001; }
  45.  
  46. #endif // GLOBALS_H
  47.