diff options
| author | hachem <im@hachem.wtf> | 2026-09-06 18:53:09 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-09-06 18:53:09 +0200 |
| commit | 565af48c1eff190ce836293a0eda75c0dc695c82 (patch) | |
| tree | bb07b022eec34450651eaea07b474d581e936e17 /include/maths/complex.h | |
| parent | 4d404450cd53946e56cc64c66372f0b2d439dbc6 (diff) | |
refactor: split public headers into include/
Diffstat (limited to 'include/maths/complex.h')
| -rw-r--r-- | include/maths/complex.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/maths/complex.h b/include/maths/complex.h new file mode 100644 index 0000000..c94f64a --- /dev/null +++ b/include/maths/complex.h @@ -0,0 +1,28 @@ +#pragma once + +struct PsiComplex +{ + double real; + double imaginary; +}; + +struct PsiComplex psi_new_complex(double real, double imaginary); +struct PsiComplex psi_new_complex_from_real(double real); + +struct PsiComplex psi_conjugate_complex(struct PsiComplex z); +struct PsiComplex psi_neg_complex(struct PsiComplex z); + +double psi_phase_complex(struct PsiComplex z); +double psi_norm2_complex(struct PsiComplex z); +double psi_abs_complex(struct PsiComplex z); +struct PsiComplex psi_sqrt_complex(struct PsiComplex z); + +struct PsiComplex psi_add_complex(struct PsiComplex a, struct PsiComplex b); +struct PsiComplex psi_sub_complex(struct PsiComplex a, struct PsiComplex b); +struct PsiComplex psi_mul_complex(struct PsiComplex a, struct PsiComplex b); +struct PsiComplex psi_div_complex(struct PsiComplex a, struct PsiComplex b); + +struct PsiComplex psi_add_complex_real(struct PsiComplex a, double b); +struct PsiComplex psi_sub_complex_real(struct PsiComplex a, double b); +struct PsiComplex psi_mul_complex_real(struct PsiComplex a, double b); +struct PsiComplex psi_div_complex_real(struct PsiComplex a, double b); |
