Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/engine/calculate.h
diff options
context:
space:
mode:
authorBernie Innocenti <bernie@codewiz.org>2010-05-03 21:53:47 (GMT)
committer Bernie Innocenti <bernie@codewiz.org>2010-05-03 21:53:47 (GMT)
commit1030dc837b10a03a02a85d5504cbeec168ce49e2 (patch)
tree698eefa87ac437deaf36a4141b326f8ce7986692 /src/engine/calculate.h
Import XaoS r489 (trunk after version 3.5)
Diffstat (limited to 'src/engine/calculate.h')
-rw-r--r--src/engine/calculate.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/engine/calculate.h b/src/engine/calculate.h
new file mode 100644
index 0000000..ab6ca40
--- /dev/null
+++ b/src/engine/calculate.h
@@ -0,0 +1,37 @@
+
+static pixel32_t INLINE
+calculate(number_t x, number_t y, int periodicity) CONSTF;
+static pixel32_t INLINE calculate(number_t x, number_t y, int periodicity)
+{
+ pixel32_t i;
+
+ rotateback(cfractalc, x, y);
+ if (cfractalc.plane) {
+ recalculate(cfractalc.plane, &x, &y);
+ }
+ STAT(ncalculated2++);
+#ifndef SLOWFUNCPTR
+ if (cfractalc.mandelbrot) {
+ if (cformula.flags & STARTZERO)
+ i = cfractalc.calculate[periodicity] (cfractalc.bre,
+ cfractalc.bim, x, y);
+ else
+ i = cfractalc.calculate[periodicity] (x + cfractalc.bre,
+ y + cfractalc.bim, x, y);
+ } else
+ i = cfractalc.calculate[periodicity] (x, y, cfractalc.pre,
+ cfractalc.pim);
+#else
+ if (cfractalc.mandelbrot) {
+ if (cformula.flags & STARTZERO)
+ i = calculateswitch(cfractalc.bre, cfractalc.bim, x, y,
+ periodicity);
+ else
+ i = calculateswitch(x + cfractalc.bre, y + cfractalc.bim, x, y,
+ periodicity);
+ } else
+ i = calculateswitch(x, y, cfractalc.pre, cfractalc.pim,
+ periodicity);
+#endif
+ return (i);
+}