|
|
Re: Help with algorithm for adjusting RGB colors
Posted:
Jan 5, 2013 3:51 PM
|
|
In article <6cpge8lpbou490ull8025mo3du96mt9t5a@4ax.com>, David C. Ullrich <ullrich@math.okstate.edu> wrote:
>> Sub MyRandCharColors() >> Dim oChr As Range >> Dim sngR As Single, sngG As Single, sngB As Single >> Randomize
>It's a common thing, people calling Randomize, or the >equivalent in another language, in the body of a >function like this, thinking that the more calls to >Randomize the better.
There are other reasons why the function might call Randomize. In particular, it might be considered a library function and not want to assume that the calling program will call it.
>You think calling Randomize over and over is >making things more random, but it actually >makes things _less_ random. The story: >Randomize sets some "seed" based on the >system clock. Once that seed is set, repeated >calls to Rnd return a sequence of quasi-random >numbers, starting with he seed.
I hope not. It would make more sense for it to combine something based on the clock with the current random state.
-- Richard
|
|