diff options
author | David Phillips <dbphillipsnz@gmail.com> | 2016-03-30 00:20:38 +1300 |
---|---|---|
committer | David Phillips <dbphillipsnz@gmail.com> | 2016-03-30 00:20:38 +1300 |
commit | 1d50fb35485583404691d5f30420fa9d494af35f (patch) | |
tree | 27ca535829590b1099b319032b30275fd8940c44 /algorithms/burning-ship.c | |
parent | b2bc9c90c39b37bf939633d44f717583413e47d9 (diff) | |
download | fractal-gen-1d50fb35485583404691d5f30420fa9d494af35f.tar.xz |
Style and misc updates
Diffstat (limited to 'algorithms/burning-ship.c')
-rw-r--r-- | algorithms/burning-ship.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/algorithms/burning-ship.c b/algorithms/burning-ship.c index c36c8c5..5c7d2e3 100644 --- a/algorithms/burning-ship.c +++ b/algorithms/burning-ship.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. */ -#include "../fractal-gen.h" +#include "common.h" void *generate_burning_ship_section(void *section) { @@ -49,10 +49,10 @@ void *generate_burning_ship_section(void *section) c = a+I*b; for (i = 0; i < iterat; i++) { - if (cabsf(z) >= 2) + if (cabs(z) >= 2) break; - z = cpow( cabsf(crealf(z)) + I*cabsf(cimagf(z)) , power) + c; + z = cpow( fabs(creal(z)) + I*fabs(cimag(z)) , power) + c; } d->data[d->idx++] = (255*i)/iterat; a += (clust_total*size_units)/size; |