RtlUniform (NTDLL.@)
ULONG RtlUniform ( PULONG seed )
Generates an uniform random number.
seed | [Out] | The seed of the Random function. |
It returns a random number uniformly distributed over [0..MAXLONG-1].
Generates an uniform random number using D.H. Lehmer's 1948 algorithm. In our case the algorithm is:
result = (*seed * 0x7fffffed + 0x7fffffc3) % MAXLONG; *seed = result;.
The native documentation states that the random number is uniformly distributed over [0..MAXLONG]. In reality the native function and our function return a random number uniformly distributed over [0..MAXLONG-1].
Defined in "winternl.h".
Implemented in "dlls/ntdll/rtl.c". source.winehq.org/source/dlls/ntdll/rtl.c
Debug channel "ntdll".
Copyright © 2008 The Wine Project. All trademarks are the property of their respective owners. Visit WineHQ for license details. Generated Nov 2008.