08-30-2024, 04:21 AM
Yes, I recall how Bill didn't think using SQR could possibly work, until I did exactly that. Mostly thanks to _INTEGER64, it worked.
That reminds me....
Could be modified to...
Pete
That reminds me....
Code: (Select All)
Sub FC3 (cx, cy, r, clr&)
Line (cx - r, cy)-(cx + r, cy), clr&, BF
y = 1
r2 = r * r ' Dav mod
While y <= r
y2 = y * y
If y2 < r2 Then
x = Int(Sqr(r2 - y2))
Line (cx - x, cy + y)-(cx + x, cy + y), clr&, BF
Line (cx - x, cy - y)-(cx + x, cy - y), clr&, BF
End If
y = y + 1
Wend
End Sub
Could be modified to...
Code: (Select All)
Sub FC3 (cx, cy, r, clr&)
Dim x as Integer
Line (cx - r, cy)-(cx + r, cy), clr&, BF
r2 = r * r ' Dav mod
Do Until y > r
y = y + 1
y2 = y * y
If y2 < r2 Then
x = Sqr(r2 - y2)
Line (cx - x, cy + y)-(cx + x, cy + y), clr&, BF
Line (cx - x, cy - y)-(cx + x, cy - y), clr&, BF
End If
Loop
End Sub
Pete
Shoot first and shoot people who ask questions, later.