some new things, mostly not working or finished
This commit is contained in:
25
math/complex.h
Normal file
25
math/complex.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef COMPLEX_H
|
||||
#define COMPLEX_H
|
||||
|
||||
typedef struct {
|
||||
double re;
|
||||
double im;
|
||||
} Complex;
|
||||
|
||||
Complex complex_new(double re, double im);
|
||||
Complex complex_add(Complex a, Complex b);
|
||||
Complex complex_sub(Complex a, Complex b);
|
||||
Complex complex_mul(Complex a, Complex b);
|
||||
Complex complex_div(Complex a, Complex b);
|
||||
Complex complex_scale(Complex a, double alpha);
|
||||
Complex complex_conjugate(Complex a);
|
||||
Complex complex_reciprocal(Complex a);
|
||||
double complex_abs(Complex a);
|
||||
double complex_phase(Complex a);
|
||||
Complex complex_exp(Complex a);
|
||||
Complex complex_sin(Complex a);
|
||||
Complex complex_cos(Complex a);
|
||||
Complex complex_tan(Complex a);
|
||||
void complex_print(Complex a);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user