Info2P5/complex.h
2025-05-22 08:57:58 +02:00

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