RosettaCodeData/Task/Mandelbrot-set/BASIC/mandelbrot-set-10.basic
2018-06-22 20:57:24 +00:00

15 lines
242 B
Text

Function mandel(xi As Double, yi As Double)
maxiter = 256
x = 0
y = 0
For i = 1 To maxiter
If ((x * x) + (y * y)) > 4 Then Exit For
xt = xi + ((x * x) - (y * y))
y = yi + (2 * x * y)
x = xt
Next
mandel = i
End Function