1/**
2 * Mandelbulber v2, a 3D fractal generator  _%}}i*<.        ____                _______
3 * Copyright (C) 2020 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 c constant to z vector. C addition constant varies based on iteration parameters.
10
11 * This file has been autogenerated by tools/populateUiInformation.php
12 * from the file "fractal_transf_add_constant_vary_v1.cpp" in the folder formula/definition
13 * D O    N O T    E D I T    T H I S    F I L E !
14 */
15
16REAL4 TransfAddConstantVaryV1Iteration(REAL4 z, __constant sFractalCl *fractal, sExtendedAuxCl *aux)
17{
18	REAL4 tempVC = fractal->transformCommon.additionConstant000; // constant to be varied
19	if (aux->i < fractal->transformCommon.startIterations250)
20	{
21		;
22	}
23	if (aux->i >= fractal->transformCommon.startIterations250
24			&& aux->i < fractal->transformCommon.stopIterations
25			&& (fractal->transformCommon.stopIterations - fractal->transformCommon.startIterations250
26					!= 0))
27	{
28		int iterationRange =
29			fractal->transformCommon.stopIterations - fractal->transformCommon.startIterations250;
30		int currentIteration = (aux->i - fractal->transformCommon.startIterations250);
31		tempVC += fractal->transformCommon.offset000 * (1.0f * currentIteration) / iterationRange;
32	}
33	if (aux->i >= fractal->transformCommon.stopIterations)
34	{
35		tempVC = (tempVC + fractal->transformCommon.offset000);
36	}
37	z += tempVC;
38	return z;
39}