home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / prog_c / suplib.lzh / SUPLIB / INCLUDE / LOCAL / MATHLIB.H < prev    next >
C/C++ Source or Header  |  1991-08-16  |  489b  |  27 lines

  1.  
  2. /*
  3.  *  Y = LineIntX(x0,y0,dx,dy) at x = 0  dx must be non-zero
  4.  *  X = LineIntY(x0,y0,dx,dy) at y = 0  dy must be non-zero
  5.  */
  6.  
  7. #ifndef MATHLIB_H
  8. #define MATHLIB_H
  9.  
  10. #define LineIntXAxis(x0,y0,dx,dy) ((y0) - MulDiv(x0,dy,dx))
  11. #define LineIntYAxis(x0,y0,dx,dy) ((x0) - MulDiv(y0,dx,dy))
  12. #define SwapInt(i0,i1)  { register long tmp = i0; i0 = i1; i1 = tmp; }
  13.  
  14. typedef struct {
  15.     long x0;
  16.     long y0;
  17.     long x1;
  18.     long y1;
  19. } B2;
  20.  
  21. typedef struct {
  22.     long x;
  23.     long y;
  24. } C2;
  25.  
  26. #endif
  27.