Johannes Kutning 0d1b73e3e0 Initial commit
2023-10-31 07:47:27 +01:00

28 lines
596 B
C

#pragma once
typedef struct {
float re;
float im;
} Complex;
float complex_abs( const Complex * c );
float complex_arg( const Complex * a );
Complex complex_comjunction( const Complex * a );
float complex_phi( const Complex * c );
Complex complex_scalar_mul( const Complex * a, const float b );
Complex complex_mul( const Complex * a, const Complex * b );
Complex complex_add( const Complex * a, const Complex * b );
Complex complex_sub( const Complex * a, const Complex * b );
Complex complex_polar( float roh, float theta );
Complex complex_pow( const Complex * a, int n );