.\" -*- nroff -*- .\" Generated file - DO NOT EDIT! .TH RtlUniform 3w "Oct 2012" "Wine API" "Wine API" .SH NAME \fBRtlUniform\fR (NTDLL.@) .SH SYNOPSIS ULONG RtlUniform ( PULONG \fIseed\fR ) .SH DESCRIPTION .PP Generates an uniform random number. .SH PARAMS \fIseed\fR \fB[Out]\fR The \fIseed\fR of the Random function. .PP .SH RETURNS .PP It returns a random number uniformly distributed over [0..MAXLONG-1]. .SH NOTES .PP Generates an uniform random number using D.H. Lehmer's \fB1948\fR algorithm. In our case the algorithm is: .br result = (*seed * 0x7fffffed + 0x7fffffc3) % MAXLONG; .br .br *seed = result;. .SH DIFFERENCES .PP 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]. .SH IMPLEMENTATION .PP Declared in \fB"winternl.h"\fR. .PP Implemented in \fB"dlls/ntdll/rtl.c"\fR. .PP Debug channel \fB"ntdll"\fR.