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 * scale variation v1. Scale varies based on iteration parameters.
10
11 * This file has been autogenerated by tools/populateUiInformation.php
12 * from the file "fractal_transf_scale_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 TransfScaleVaryV1Iteration(REAL4 z, __constant sFractalCl *fractal, sExtendedAuxCl *aux)
17{
18	REAL tempVC = fractal->transformCommon.scale; // constant to be varied
19
20	if (aux->i >= fractal->transformCommon.startIterations250
21			&& aux->i < fractal->transformCommon.stopIterations
22			&& (fractal->transformCommon.stopIterations - fractal->transformCommon.startIterations250
23					!= 0))
24	{
25		int iterationRange =
26			fractal->transformCommon.stopIterations - fractal->transformCommon.startIterations250;
27		int currentIteration = (aux->i - fractal->transformCommon.startIterations250);
28		tempVC += fractal->transformCommon.offset0 * (1.0f * currentIteration) / iterationRange;
29	}
30	if (aux->i >= fractal->transformCommon.stopIterations)
31	{
32		tempVC = (tempVC + fractal->transformCommon.offset0);
33	}
34	z *= tempVC;
35	aux->DE = aux->DE * fabs(tempVC) + 1.0f;
36	return z;
37}