14 lines
462 B
C
14 lines
462 B
C
#ifndef COMPLEX_H
|
|
#define COMPLEX_H
|
|
typedef struct {
|
|
double real;
|
|
double imag;
|
|
} Complex;
|
|
Complex* createComplex(double real, double imag);
|
|
void freeComplex(Complex* z);
|
|
Complex* addComplex(const Complex* a, const Complex* b);
|
|
Complex* subtractComplex(const Complex* a, const Complex* b);
|
|
Complex* multiplyComplex(const Complex* a, const Complex* b);
|
|
Complex* divideComplex(const Complex* a, const Complex* b);
|
|
void printComplex(const Complex* z);
|
|
#endif |