Random Number Generator interface.
More...
#include <cri_le_atom_ex.h>
Random Number Generator interface.
◆ CalculateWorkSize
CriSint32(* CalculateWorkSize) (void) |
Calculate the work buffer size.
- Returns
- CriSint32 work buffer size
- Description:
- Calculates the size of the work buffer required to create a Random Number Generator.
◆ Create
Create a Random Number Generator.
- Parameters
-
[in] | work | work buffer |
[in] | work_size | work buffer size |
- Returns
- CriAtomExRngHn Random Number Generator handle
- Description:
- Creates a Random Number Generator.
If this function fails to create a Random Number Generator, it returns NULL.
◆ Destroy
Destroy a Random Number Generator.
- Parameters
-
[in] | rng | Random Number Generator handle |
- Description:
- Destroys a Random Number Generator.
◆ Generate
CriSint32(* Generate) (CriAtomExRngHn rng, CriSint32 min, CriSint32 max) |
Generate a random number.
- Parameters
-
[in] | rng | Random Number Generator handle |
[in] | min | minimum value |
[in] | max | maximum value |
- Returns
- CriSint32 random number
- Description:
- Generates a new random number.
The generated number will be between min and max (both included).
◆ SetSeed
Set a random seed.
- Parameters
-
[in] | rng | Random Number Generator handle |
[in] | seed | random seed |
- Description:
- Sets the random seed used to generate a random number.
The documentation for this struct was generated from the following file: