![]() |
PicoVGA
1.2-cmake
VGA/TV display on Raspberry Pico
|
Random number generator.

Go to the source code of this file.
Data Structures | |
| class | cRandom |
| Random Generator. More... | |
| class | cGaussFRandom |
| Gaussian random float number generator. More... | |
| class | cGaussDRandom |
| Gaussian random double number generator. More... | |
Functions | |
| u64 | RandSeed () |
| Get random generator seed. | |
| void | RandSetSeed (u64 seed) |
| Set random generator seed. | |
| void | RandInitSeed () |
| Set random seed from ROSC counter. | |
| u8 | RandU8 () |
| Generate integer random number in full range. | |
| u16 | RandU16 () |
| Generate integer random number in full range. | |
| u32 | RandU32 () |
| Generate integer random number in full range. | |
| u64 | RandU64 () |
| Generate integer random number in full range. | |
| s8 | RandS8 () |
| Generate integer random number in full range. | |
| s16 | RandS16 () |
| Generate integer random number in full range. | |
| s32 | RandS32 () |
| Generate integer random number in full range. | |
| s64 | RandS64 () |
| Generate integer random number in full range. | |
| float | RandFloat () |
| Generate float random number in range 0 (including) to 1 (excluding) | |
| double | RandDouble () |
| Generate double random number in range 0 (including) to 1 (excluding) | |
| u8 | RandU8Max (u8 max) |
| Generate random number in range 0 to MAX (including) | |
| u16 | RandU16Max (u16 max) |
| Generate random number in range 0 to MAX (including) | |
| u32 | RandU32Max (u32 max) |
| Generate random number in range 0 to MAX (including) | |
| u64 | RandU64Max (u64 max) |
| Generate random number in range 0 to MAX (including) | |
| s8 | RandS8Max (s8 max) |
| Generate random number in range 0 to MAX (including) | |
| s16 | RandS16Max (s16 max) |
| Generate random number in range 0 to MAX (including) | |
| s32 | RandS32Max (s32 max) |
| Generate random number in range 0 to MAX (including) | |
| s64 | RandS64Max (s64 max) |
| Generate random number in range 0 to MAX (including) | |
| float | RandFloatMax (float max) |
| Generate decimal random number in range 0 (including) to MAX (excluding) | |
| double | RandDoubleMax (double max) |
| Generate decimal random number in range 0 (including) to MAX (excluding) | |
| u8 | RandU8MinMax (u8 min, u8 max) |
| Generate random number in range MIN to MAX (including). If MIN > MAX, then number is generated out of interval. | |
| u16 | RandU16MinMax (u16 min, u16 max) |
| Generate random number in range MIN to MAX (including). If MIN > MAX, then number is generated out of interval. | |
| u32 | RandU32MinMax (u32 min, u32 max) |
| Generate random number in range MIN to MAX (including). If MIN > MAX, then number is generated out of interval. | |
| u64 | RandU64MinMax (u64 min, u64 max) |
| Generate random number in range MIN to MAX (including). If MIN > MAX, then number is generated out of interval. | |
| s8 | RandS8MinMax (s8 min, s8 max) |
| Generate random number in range MIN to MAX (including). If MIN > MAX, then number is generated out of interval. | |
| s16 | RandS16MinMax (s16 min, s16 max) |
| Generate random number in range MIN to MAX (including). If MIN > MAX, then number is generated out of interval. | |
| s32 | RandS32MinMax (s32 min, s32 max) |
| Generate random number in range MIN to MAX (including). If MIN > MAX, then number is generated out of interval. | |
| s64 | RandS64MinMax (s64 min, s64 max) |
| Generate random number in range MIN to MAX (including). If MIN > MAX, then number is generated out of interval. | |
| float | RandFloatMinMax (float min, float max) |
| Generate random number in range MIN to MAX (including). If MIN > MAX, then number is generated out of interval. | |
| double | RandDoubleMinMax (double min, double max) |
| Generate random number in range MIN to MAX (including). If MIN > MAX, then number is generated out of interval. | |
| float | RandGaussF (float mean=0, float sigma=1) |
| Generate Gaussian random number (mean = center, sigma = width) | |
| double | RandGaussD (double mean=0, double sigma=1) |
| Generate Gaussian random number (mean = center, sigma = width) | |
| float | Noise1D (int x, int seed) |
| 1D coordinate noise generator (output -1..+1) | |
| float | Noise2D (int x, int y, int seed) |
| 2D coordinate noise generator (output -1..+1) | |
| float | Noise3D (int x, int y, int z, int seed) |
| 3D coordinate noise generator (output -1..+1) | |
| float | SmoothNoise1D (float x, int scale, int seed) |
| Interpolated 1D noise (output -1..+1, scale = 1...) | |
| float | SmoothNoise2D (float x, float y, int scale, int seed) |
| Interpolated 2D noise (output -1..+1, scale = 1...) | |
Variables | |
| cRandom | Rand |
| Global random generator. | |
| cGaussFRandom | GaussFRand |
| Global Gaussian random float number generator. | |
| cGaussDRandom | GaussDRand |
| Global Gaussian random double number generator. | |