home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / src / lib / gprim / discgrp / complex.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-16  |  1.0 KB  |  46 lines

  1. #ifndef _complex_
  2. #define _complex_
  3.  
  4. #include <math.h>
  5.  
  6. typedef struct {
  7.     double    real,
  8.             imag;
  9. } complex;
  10.  
  11. typedef complex sl2c_matrix[2][2];
  12.  
  13. #ifndef PROTOTYPES
  14. Please #include options.h BEFORE complex.h.
  15. #endif
  16.  
  17. #if PROTOTYPES
  18. extern complex    cplx_minus(complex, complex),
  19.                 cplx_plus(complex, complex),
  20.                 cplx_mult(complex, complex),
  21.                 cplx_div(complex, complex);
  22. extern double    modulus(complex);
  23. extern complex    cplx_sqrt(complex);
  24. extern void        sl2c_mult(sl2c_matrix, sl2c_matrix, sl2c_matrix);
  25. extern void        sl2c_copy(sl2c_matrix, sl2c_matrix);
  26. extern void        sl2c_normalize(sl2c_matrix);
  27. extern void        sl2c_invert(sl2c_matrix, sl2c_matrix);
  28. extern double    sl2c_norm_squared(sl2c_matrix);
  29. extern void        sl2c_adjoint(sl2c_matrix, sl2c_matrix);
  30. extern double    acosh(double);
  31. #else
  32. extern complex    cplx_minus(),
  33.                 cplx_plus(),
  34.                 cplx_mult(),
  35.                 cplx_div();
  36. extern double    modulus();
  37. extern complex    cplx_sqrt();
  38. extern double    sl2c_norm_squared();
  39. /*extern double    acosh();*/
  40. #endif
  41.  
  42. extern complex zero;
  43. extern complex one;
  44.  
  45. #endif
  46.