(08-28-2024, 12:30 PM)Dav Wrote: Hey, neat mod! I thought it may be a little faster putting the r * r outside of the loop, and it made FC2 a wee bit faster.
- Dav
Code: (Select All)
Sub FC3 (cx, cy, r, clr&)
Line (cx - r, cy)-(cx + r, cy), clr&, BF
y = 1
r2 = r * r
While y <= r
x = Int(Sqr(r2 - y * y))
Line (cx - x, cy + y)-(cx + x, cy + y), clr&, BF
Line (cx - x, cy - y)-(cx + x, cy - y), clr&, BF
y = y + 1
Wend
End Sub
+1 Yeah! one less calculation!
I just tested 10 runs on QB64 v 2.1 and the results are upside down!
7 wins for fcirc, 2 wins for FC2 and 1 tie!
Plus the times are less!!! (This is with checking off still).
Did you guys (developers) break something?
b = b + ...