THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/05/2008 at 10:12, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10.1.1
Platform: Mac OSX ;
Language(s) : C.O.F.F.E.E ;
---------
Can anyone tell me why the following COFFEE code requires at least two calls of the Get01 or Get11 members to generate a non-sequential random number? If I execute the function by playing the timeline forward, random1 creeps from roughly -.9 to 0.9 in increments of rougly 0.05, whereas random2 and random3 seem to generate true random numbers between -1 and 1 even though the same time() seed is used for initialization. I guess my real question is...how do I fix this to avoid processing a behind the scenes random prior to creating a genuine pseudorandom.
Thanks
main(doc, op)
{
var random = new(Random);
random->Init(time());
println("random1 = ", random->Get11());
println("random2 = ", random->Get11());
println("random3 = ", random->Get11());
}