08-26-2022, 05:49 PM
Excellent. I had been looking at it too long and totally forgot calculating r^2 only has to happen once. Thank you.
Code: (Select All)
Sub rcircle (cx As Long, cy As Long, r As Long, klr As _Unsigned Long)
rsqrd = r * r
y = 0
While y <= r
x = Sqr(rsqrd - y * y)
Line (cx - x, cy + y)-(cx + x, cy + y), klr
Line (cx - x, cy - y)-(cx + x, cy - y), klr
y = y + 1
Wend
End Sub