diff options
author | mjfernez <mjfernez@gmail.com> | 2021-03-28 02:41:16 -0400 |
---|---|---|
committer | mjfernez <mjfernez@gmail.com> | 2021-03-28 02:41:16 -0400 |
commit | b45b3948e5082a1b20419286a5059bd93834d167 (patch) | |
tree | d7025d05c23687d7714a79c8e73c9be0b560aefd | |
parent | 8b8b4bd67e9f384c17e7dc640c929429356aac0d (diff) | |
download | scripts-n-tools-b45b3948e5082a1b20419286a5059bd93834d167.tar.gz |
Broken code, misplaced semicolon
There was an extra semicolon in the if condition in the julias function.
Unused variables also removed
-rwxr-xr-x | julia-c/julia | bin | 187240 -> 187208 bytes | |||
-rw-r--r-- | julia-c/julia.c | 4 |
2 files changed, 1 insertions, 3 deletions
diff --git a/julia-c/julia b/julia-c/julia Binary files differindex b30986c..cf88bef 100755 --- a/julia-c/julia +++ b/julia-c/julia diff --git a/julia-c/julia.c b/julia-c/julia.c index de0c187..d706b2a 100644 --- a/julia-c/julia.c +++ b/julia-c/julia.c @@ -35,7 +35,6 @@ const char *FUNCTION_LIST[16] = { "acos" , "acosh" , "asin" , "asinh", "atan" , "cos" , "cosh" , "exp" , "log" , "sin" , "sinh" , "sqrt" , "tan" , "tanh" , "pow" }; const int RGB_MODE = 3; // I don't care about transparency, so we go for 8 bit channel const int FSIZE = 10; // 10 is the max function size (acosh^9999, or acosh^1.125). -const double EPSILON = 0.000025; // for accounting for rounding error typedef struct { uint8_t R; @@ -105,7 +104,7 @@ int julia(char f[FSIZE], double complex z, double complex c, int d) { int ic = 0; // iteration count while (ic < d){ - if (cabs(z) > 2); // this is arbitrary + if (cabs(z) > 2) // this is arbitrary break; // the rationale is that the function is complex // so in certain spots it will be cyclical // and bounded under ~1 or ~2 @@ -162,7 +161,6 @@ int write_image(char f[FSIZE], double complex seed, int r[2], int depth, double x = bounds[0]; // increment vertical y += dy/((double) r[1]); - fprintf(stderr, "x: %5f, y: %5f p: %d\n", x, y, cur_pixel); } double complex z = x + y * I; int out = julia(f, z, seed, depth); |