X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=fourier%2Ffourier.h;fp=fourier%2Ffourier.h;h=5a8ddb38d117aa91da9ae88247b528cea0907861;hb=15a0affd01053e899568c0ee1e7bd1315e11f925;hp=0000000000000000000000000000000000000000;hpb=ea939060d8c1df6b3de0b3204a0b5b06018ee8da;p=my-code%2Fapi.git diff --git a/fourier/fourier.h b/fourier/fourier.h new file mode 100644 index 0000000..5a8ddb3 --- /dev/null +++ b/fourier/fourier.h @@ -0,0 +1,33 @@ +/* fourier.h -- fourier headers */ + +#ifndef FOURIER_H +#define FOURIER_H + +/* includes */ +#include + +/* defines */ +#define F_SUCCESS 1 +#define F_ERROR -1 +#define F_DIM_ERROR -2 +#define F_DLEN_ERROR -3 +#define F_MALLOC_ERROR -4 +#define F_SET_DLEN_ERROR -5 + +#define MAX_DIM 3 + +/* fourier specific variables */ +typedef struct s_complex { + double r; + double i; +} t_complex; + +typedef struct s_fourier { + int outfd; + unsigned char type; + int dim; + t_complex *data[MAX_DIM]; + int data_len[MAX_DIM]; +} t_fourier; + +#endif