set_random (integer_seed)
This function seeds the random number generator to start the pseudo-random sequence at a different number. The same integer_seed will always produce the same pseudo-random sequence. set_random is commonly called with an unpredictable integer_seed, such as the result of clock.
Gamma> set_random(95); t Gamma> random(); 0.26711518364027142525 Gamma> random(); 0.8748339582234621048 Gamma> random(); 0.30958001874387264252 Gamma> set_random(clock()); t Gamma> random(); 0.41952831624075770378 Gamma> random(); 0.99278739839792251587 Gamma> random(); 0.42997436970472335815 Gamma>
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.