Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/engine/calculate.h
blob: ab6ca40527659d0fc9ce54f3fd5b47375d47d454 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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);
}