Mandelbrot- What am I doning wrong?

BlitzMax Forums/BlitzMax Programming/Mandelbrot- What am I doning wrong?

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

I know what it is! The DotCol function is returning an int it should return a float

Function DotCol:Float(xval:Float,yval:Float)
Local r:Float
Local i:Float
Local j:Float
Local m:Float

While (j < maxval) And (m < 4.0)
j = j + 1.0
m = (r * r) - (i * i)
i = ((2.0 * r) * i) + yval
r = m + xval
Wend

j = j / maxval
Return j
EndFunction