Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

lib_math.h/lib_math.c

Prototype

Code Block
languagecpp
          void  Math_RandSetSeed (RAND_NBR  seed);


Arguments

seed

Initial (or current) value to set for the pseudo-random number sequence.

...

IEEE Std 1003.1, 2004 Edition, Section ‘rand() : DESCRIPTION’ states that “srand() ... uses the argument as a seed for a new sequence of pseudo-random numbers to be returned by subsequent calls to rand()”.

Example Usage

Code Block
languagecpp
          RAND_NBR  seed;


          seed = 9876;
          Math_RandSetSeed(seed);