|
STM32 core 3.0.1-dev
Arduino core for STM32 based boards: API reference
|
← STM32duino documentation
|
Pseudo-random number functions: randomSeed() and random(). More...
#include "stdlib.h"#include "stdint.h"Functions | |
| void | randomSeed (unsigned long dwSeed) |
| Seed the pseudo-random number generator. | |
| long | random (long howbig) |
| Return a pseudo-random number in the range [0, howbig). | |
| long | random (long howsmall, long howbig) |
| Return a pseudo-random number in the range [howsmall, howbig). | |
Pseudo-random number functions: randomSeed() and random().
| long random | ( | long | howbig | ) |
Return a pseudo-random number in the range [0, howbig).
| howbig | Upper bound, exclusive. 0 returns 0. |
| long random | ( | long | howsmall, |
| long | howbig | ||
| ) |
Return a pseudo-random number in the range [howsmall, howbig).
| howsmall | Lower bound, inclusive. Returned directly if it is not below howbig. |
| howbig | Upper bound, exclusive. |
| void randomSeed | ( | unsigned long | dwSeed | ) |
Seed the pseudo-random number generator.
A seed of 0 is ignored.
| dwSeed | Seed value. |