--- /dev/null
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* julia.h :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2023/12/05 19:57:50 by ljiriste #+# #+# */
+/* Updated: 2023/12/05 20:16:54 by ljiriste ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include <math.h>
+#include "vect2.h"
+#include "complex.h"
+
+double general_julia(void *zeroth, double resolution,
+ void (*tested_f)(void *), int (*is_over_thresh)(void *))
+{
+ int count;
+
+ count = 0;
+ while (!is_over_thresh(zeroth) && count < 100 * resolution)
+ {
+ tested_f(zeroth);
+ ++count;
+ }
+ if (count == 100 * resolution)
+ return (-1);
+ return (fmod(count / 100., 1.));
+}