Skip to content

Instantly share code, notes, and snippets.

@JamesLiame
Last active February 6, 2025 10:33
Show Gist options
  • Save JamesLiame/8866d725002b269cb2750950ff18f735 to your computer and use it in GitHub Desktop.
Save JamesLiame/8866d725002b269cb2750950ff18f735 to your computer and use it in GitHub Desktop.
JS-port of the Mandelbrot Equation
function mand(reso = 3, complex = 1) {
var znext = 1,
zprev = 1,
iter = reso
while (!(iter <= 0)) {
znext = zprev * zprev + complex;
zprev = znext;
iter -= 1;
}
return znext;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment