Recommend calling srand() or srandom() with seed()

This commit is contained in:
Landon Curt Noll
2021-12-09 01:34:58 -08:00
parent c0be37d4e3
commit 0d31eb6828
2 changed files with 12 additions and 2 deletions

View File

@@ -12,6 +12,11 @@ TYPES
DESCRIPTION
Seed the pseudo-random number using an subtractive 100 shuffle generator.
It you want a quick and effective way to seed the generator,
we recommended that you call srand() with the seed() value:
srand(seed())
For integer seed != 0:
Any buffered rand generator bits are flushed. The subtractive table
@@ -150,7 +155,7 @@ LINK LIBRARY
SEE ALSO
seed, srandom, randbit, isrand, random, srandom, israndom
## Copyright (C) 1999 Landon Curt Noll
## Copyright (C) 1999,2021 Landon Curt Noll
##
## Calc is open software; you can redistribute it and/or modify it under
## the terms of the version 2.1 of the GNU Lesser General Public License