Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
925 B

  1. /* -----------------------------------------------------------------------------
  2. * See the LICENSE file for information on copyright, usage and redistribution
  3. * of SWIG, and the README file for authors - http://www.swig.org/release.html.
  4. *
  5. * ccomplex.i
  6. *
  7. * C complex typemaps
  8. * ISO C99: 7.3 Complex arithmetic <complex.h>
  9. * ----------------------------------------------------------------------------- */
  10. %include <pycomplex.swg>
  11. %{
  12. #include <complex.h>
  13. %}
  14. /* C complex constructor */
  15. #define CCplxConst(r, i) ((r) + I*(i))
  16. %swig_cplxflt_convn(float complex, CCplxConst, creal, cimag);
  17. %swig_cplxdbl_convn(double complex, CCplxConst, creal, cimag);
  18. %swig_cplxdbl_convn(complex, CCplxConst, creal, cimag);
  19. /* declaring the typemaps */
  20. %typemaps_primitive(SWIG_TYPECHECK_CPLXFLT, float complex);
  21. %typemaps_primitive(SWIG_TYPECHECK_CPLXDBL, double complex);
  22. %typemaps_primitive(SWIG_TYPECHECK_CPLXDBL, complex);