1. Re: xor_line
- Posted by Ad Rienks <Ad_Rienks at COMPUSERVE.COM> Oct 25, 1998
- 634 views
Hawke wrote:
>i've been goofing around with bresenham's circle algorithm...
>it seems to miss a couple dots around the circle...
I think I know the reason: look at the round() function you posted the
other day.
For negative numbers it doesn't round down, thus to a greater negative
number,
but up (towards 0).
Try this:
for n =3D -10 to 10 do
printf(1, "%d/2 rounds to %d\n", {n, round(n/2)})
end for
Hope this helps
Ad

