RandomSeed

From Pinguino
Jump to: navigation, search

Name

randomSeed - Seed for the pseudo-random generator

Description

randomSeed sets its argument as the seed for the sequence of pseudo-random integers returned by rand. A fixed seed repeatably produce the same pseudo-random sequence.

randomSeed should be called with an value based on an external event if you need a different sequence for each run. See the millis function.

Syntax

randomSeed(seed);
seed
Seed as an unsigned int
Output
None

Example

Bugs

See also

Comments