This commit is contained in:
Kartik K. Agaram 2021-06-23 01:01:42 -07:00
parent cfa1bac8bb
commit ba0c41673b
1 changed files with 3 additions and 3 deletions

View File

@ -161,7 +161,7 @@
(circle . [def (circle scr cx cy r clr)
with (x (0 - r)
y 0
err (2 - (* 2 r))
err (2 - r*2)
continue 1)
while continue
(pixel scr cx-x cy+y clr)
@ -171,10 +171,10 @@
(set r err)
when (r <= y)
++y
err += (1 + (2 * y))
err += (y*2 + 1)
when (or (r > x) (err > y))
++x
err += (+ 1 (* 2 x))
err += (x*2 + 1)
set continue (x < 0)])
(ring . [def (ring screen cx cy r0 w clr)
for r r0 (r < (r0 + w)) ++r