aboutsummaryrefslogtreecommitdiffstats
path: root/julia-c/julia.c
diff options
context:
space:
mode:
authormjfernez <mjfernez@gmail.com>2021-03-28 02:41:16 -0400
committermjfernez <mjfernez@gmail.com>2021-03-28 02:41:16 -0400
commitb45b3948e5082a1b20419286a5059bd93834d167 (patch)
treed7025d05c23687d7714a79c8e73c9be0b560aefd /julia-c/julia.c
parent8b8b4bd67e9f384c17e7dc640c929429356aac0d (diff)
downloadscripts-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
Diffstat (limited to 'julia-c/julia.c')
-rw-r--r--julia-c/julia.c4
1 files changed, 1 insertions, 3 deletions
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);