home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Sound / SoX / Source / resdefs.h < prev    next >
C/C++ Source or Header  |  1999-07-18  |  879b  |  40 lines

  1.  
  2. /*
  3.  * FILE: stdefs.h
  4.  *   BY: Christopher Lee Fraley
  5.  * DESC: Defines standard stuff for inclusion in C programs.
  6.  * DATE: 6-JUN-88
  7.  * VERS: 1.0  (6-JUN-88, 2:00pm)
  8.  */
  9.  
  10.  
  11. #define TRUE  1
  12. #define FALSE 0
  13.  
  14. /* Some files include both this file and math.h which will most
  15.  * likely already have PI defined.
  16.  */
  17. #ifndef PI
  18. #define PI (3.14159265358979232846)
  19. #endif
  20. #ifndef PI2
  21. #define PI2 (6.28318530717958465692)
  22. #endif
  23. #define D2R (0.01745329348)          /* (2*pi)/360 */
  24. #define R2D (57.29577951)            /* 360/(2*pi) */
  25.  
  26. #define MAX(x,y) ((x)>(y) ?(x):(y))
  27. #define MIN(x,y) ((x)<(y) ?(x):(y))
  28. #define ABS(x)   ((x)<0   ?(-(x)):(x))
  29. #define SGN(x)   ((x)<0   ?(-1):((x)==0?(0):(1)))
  30.  
  31. typedef char           BOOL;
  32. typedef short          HWORD;
  33. typedef unsigned short UHWORD;
  34. typedef int            IWORD;
  35. #ifndef    WORD
  36. typedef int        WORD;
  37. #endif
  38. typedef unsigned int   UWORD;
  39.  
  40.