diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-08-16 18:06:21 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-08-16 18:06:21 -0400 |
commit | 48d2528a5b7b031111fa24c53ca28d3ddc436a79 (patch) | |
tree | 6d74b997546f82a58a2aaffc4b92703314bf058c /src/complex/CMPLXF.h | |
parent | 26263389556d583a16e26834c7f14bb7be7b3b17 (diff) |
rename non-compiled files to *.h
Diffstat (limited to 'src/complex/CMPLXF.h')
-rw-r--r-- | src/complex/CMPLXF.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/complex/CMPLXF.h b/src/complex/CMPLXF.h new file mode 100644 index 00000000..397e7ad7 --- /dev/null +++ b/src/complex/CMPLXF.h @@ -0,0 +1,16 @@ +#include <complex.h> + +#ifdef __STDC_IEC_559_COMPLEX__ +#define CMPLXF(__x, __y) \ + ((float complex)((float)(__x) + _Imaginary_I * (float)(__y))) +#else +#define CMPLXF(__x, __y) \ + (((union { \ + float complex __c; \ + float __f[2]; \ + }){ .__f = { __x, __y } }).__c) +#endif + +/* +STDC(201112) +*/ |