Einzelnen Beitrag anzeigen

Benutzerbild von DP News-Robot
DP News-Robot

Registriert seit: 4. Jun 2010
14.982 Beiträge
 
#1

Delphi: RandomizeIfNeeded

  Alt 7. Okt 2014, 06:20
Calling Randomize too often can make your Random numbers even less random. Sometimes having the Randomize call in a unit initialization section is not practical. Hence this little method that I think I first wrote back in the Turbo Pascal days: procedure RandomizeIfNeeded(); begin if RandSeed = 0 ...

More...
  Mit Zitat antworten Zitat