X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fmath%2Fsg_random.c;h=d9f6bcb78f9c8642abc3ab32c2c807cd370e00e1;hb=584ee1364f25e5c3795f9ff4633a792cba39bfc7;hp=e9004323b2fa93f7d5744005fa71abefb9b70088;hpb=605125c0e7589ab027561227dcc2bb8e0a51f1ab;p=simgear.git diff --git a/simgear/math/sg_random.c b/simgear/math/sg_random.c index e9004323..d9f6bcb7 100644 --- a/simgear/math/sg_random.c +++ b/simgear/math/sg_random.c @@ -59,6 +59,11 @@ void mt_init(mt *mt, unsigned int seed) mt->index = MT_N+1; } +void mt_init_time_10(mt *mt) +{ + mt_init(mt, (unsigned int) time(NULL) / 600); +} + unsigned int mt_rand32(mt *mt) { unsigned int i, y;