[riot-notifications] [RIOT] add mersene twister (#168)

Oleg Hahm notifications at github.com
Thu Aug 22 13:16:28 CEST 2013


> +        i++;
> +        if (i >= N) {
> +            mt[0] = mt[N - 1];
> +            i = 1;
> +        }
> +    }
> +
> +    mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */
> +}
> +
> +/**
> + * generates a random number on [0,0xffffffff]-interval
> + */
> +uint32_t genrand_int32(void)
> +{
> +    uint32_t y;

What's wrong with ANSI style declarations? I personally prefer them.

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/168/files#r5921560
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20130822/32fa1662/attachment.html>


More information about the notifications mailing list