ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/util.h
(Generate patch)

Comparing deliantra/server/include/util.h (file contents):
Revision 1.85 by root, Thu Jan 1 20:49:48 2009 UTC vs.
Revision 1.86 by root, Sat Jan 3 01:04:19 2009 UTC

409 409
410// Xorshift RNGs, George Marsaglia 410// Xorshift RNGs, George Marsaglia
411// http://www.jstatsoft.org/v08/i14/paper 411// http://www.jstatsoft.org/v08/i14/paper
412// this one is about 40% faster than the tausworthe one above (i.e. not much), 412// this one is about 40% faster than the tausworthe one above (i.e. not much),
413// despite the inlining, and has the issue of only creating 2**32-1 numbers. 413// despite the inlining, and has the issue of only creating 2**32-1 numbers.
414// see also http://www.iro.umontreal.ca/~lecuyer/myftp/papers/xorshift.pdf
414struct xorshift_random_generator 415struct xorshift_random_generator
415{ 416{
416 uint32_t x, y; 417 uint32_t x, y;
417 418
418 void operator =(const xorshift_random_generator &src) 419 void operator =(const xorshift_random_generator &src)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines