"Kenneth" wrote in message
<web.497c4cb0b528db0df50167bc0@news.povray.org>:
> I made a slight mistake there (I forgot that the #while loop counter was
> starting at 0, not 1--which is how I usually start my own counters.)
I think you made two opposite mistakes:
while(i < n * 3)
is perfectly correct if i starts at 0, but would be wrong if i started at 1.
That is the reason why you should take the habit to start your loops at 0:
it makes most of the boundaries computations easier. (Although in this
particular case, changing < into <= would be enough).
Post a reply to this message
|