|
|
Jerry Anning wrote:
>
>
> Just generate the random number separately, save it in a variable, and
> use it in both places. For your shingling project, in order to
> account for the variable positions of other shingles, you could either
> save the random numbers in an array as you create them and sum the
> correct row or column for the needed offset, or (bad idea) reset the
> random number stream with the original seed and run the random number
> through the needed number of iterations at placement time. If you are
> crazy enough to do that, you will also have to reseed and iterate each
> time in the placement loop. An array would be much better.
>
> Jerry Anning
> clem "at" dhol "dot" com
I understand how to use arrays but am unsure hot to pass a value to one
for storage and later retrieval. A brief example would be appreciated.
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|