diff options
| author | JP Appel <jeanpierre.appel01@gmail.com> | 2024-04-20 18:43:10 -0400 |
|---|---|---|
| committer | JP Appel <jeanpierre.appel01@gmail.com> | 2024-04-20 18:43:10 -0400 |
| commit | a2a904713cb2216398f4ff322d1294afe07a7502 (patch) | |
| tree | e2fa950fbb726574121aa0bb0b2febdde5e8214e /src/util.c | |
| parent | d367b424d5ad862b6191270c9190aff261d1e581 (diff) | |
now call refactored complex_to_grid correctly
Diffstat (limited to 'src/util.c')
| -rw-r--r-- | src/util.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/util.c b/src/util.c deleted file mode 100644 index b76da0b..0000000 --- a/src/util.c +++ /dev/null @@ -1,22 +0,0 @@ -#include "util.h" - -/* - * Converts a grid point into an complex number - */ -double complex lattice_to_complex(const size_t index, const vec2 resolution) { - const double x_min = -2.0; - const double x_max = 2.0; - const double y_min = -2.0; - const double y_max = 2.0; - - const double x_step = (x_max - x_min) / (double)resolution.x; - const double y_step = (y_max - y_min) / (double)resolution.y; - - const size_t x_index = index % resolution.x; - const size_t y_index = index / resolution.x; - - const double x = x_min + x_index * x_step; - const double y = y_min + y_index * y_step; - - return x + y * I; -} |
