MandAzur/src/iteration.h

29 lines
784 B
C

#ifndef ITERATION_H
#define ITERATION_H
#ifdef __cplusplus
extern "C" {
#endif
/* Quadratic iteration. This function iterates z -> z²+c for z, c complex
inputs, until a fixed number of steps is reached or |z| becomes larger than
a predefined threshold t. Computation is carried in 16:16 fixed-point.
@Re_c @Im_c Constant c [num32]
@Re_z @Im_z Initial value of z [num32]
@t_squared Squared threshold t² [num32]
@steps Maximum number of steps [int]
Returns the number of steps remaining at the time the threshold was crossed,
or 0 if it was never reached. */
int quadratic_iteration_32(
int32_t Re_c, int32_t Im_c,
int32_t Re_z, int32_t Im_z,
uint32_t t_squared, int steps);
#ifdef __cplusplus
}
#endif
#endif /* ITERATION_H */