POV-Ray : Newsgroups : povray.general : rand question : Re: rand question Server Time
5 Nov 2024 20:15:41 EST (-0500)
  Re: rand question  
From: John VanSickle
Date: 11 Feb 2003 14:20:42
Message: <3E494D23.7C164DC@hotmail.com>
Tom Melly wrote:
> 
> How many numbers are in the rand stream before it repeats itself, or
> is this a meaningless question?

#declare rsA=seed(0);
#declare rsB=seed(0);

#local sA=0;#local sB=-1;

#local cR=0;

#while(sA!=sB)

#local sA=rand(rsA);
#local sB=rand(rsB);
#local sB=rand(rsB);
#local cR=cR+1;
#end

#debug concat("Seed repeats after ",str(cR,0,0)," repetitions.\n"


Post a reply to this message

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