POV-Ray : Newsgroups : povray.pov4.discussion.general : I want to be rid of my stupid mistakes : Re: I want to be rid of my stupid mistakes Server Time
30 Apr 2024 20:10:26 EDT (-0400)
  Re: I want to be rid of my stupid mistakes  
From: Warp
Date: 21 Jul 2009 14:15:32
Message: <4a6605c4@news.povray.org>
scott <sco### [at] scottcom> wrote:
> > What if we're talking about a loop like this:
> >
> >  #declare abortProb = 0.03;
> >  #while(rand(R) > abortProb)
> >    //...
> >  #end

> Well rand() gives a different answer each time, so that can automatically be 
> counted as being reassigned in the eyes of the infinite-loop-catcher.  If 
> you try to implement your own RNG in a macro then obviously the random 
> variable will be reassigned so that would also count.

  Which one of the myriad of variables inside a potential macro call should
be enough change to decide that it's not an infinite loop?

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.