1/**
2 * Mandelbulber v2, a 3D fractal generator  _%}}i*<.        ____                _______
3 * Copyright (C) 2017 Mandelbulber Team   _>]|=||i=i<,     / __ \___  ___ ___  / ___/ /
4 *                                        \><||i|=>>%)    / /_/ / _ \/ -_) _ \/ /__/ /__
5 * This file is part of Mandelbulber.     )<=i=]=|=i<>    \____/ .__/\__/_//_/\___/____/
6 * The project is licensed under GPLv3,   -<>>=|><|||`        /_/
7 * see also COPYING file in this folder.    ~+{i%+++
8 *
9 * Adds Cpixel constant to z vector, swapping the Cpixel vector x and y axes
10 * disable swap for normal mode
11
12 * This file has been autogenerated by tools/populateUiInformation.php
13 * from the file "fractal_transf_add_cpixel_cx_cy_axis_swap.cpp" in the folder formula/definition
14 * D O    N O T    E D I T    T H I S    F I L E !
15 */
16
17REAL4 TransfAddCpixelCxCyAxisSwapIteration(
18	REAL4 z, __constant sFractalCl *fractal, sExtendedAuxCl *aux)
19{
20	REAL4 c = aux->const_c;
21
22	REAL4 tempC = c;
23	if (fractal->transformCommon.functionEnabled)
24	{
25		if (fractal->transformCommon.alternateEnabledFalse) // alternate
26		{
27			tempC = aux->c;
28			tempC = (REAL4){tempC.y, tempC.x, tempC.z, tempC.w};
29			aux->c = tempC;
30		}
31		else
32		{
33			tempC = (REAL4){c.y, c.x, c.z, c.w};
34		}
35	}
36	z += tempC * fractal->transformCommon.constantMultiplier111;
37	return z;
38}