![]() |
JSBSim Flight Dynamics Model 1.3.0 (09 Apr 2026)
An Open Source Flight Dynamics and Control Software Library in C++
|
Random number generator.
This class encapsulates the C++11 random number generation classes for uniform and gaussian (aka normal) distributions as well as their seed. This class guarantees that whenever its seed is reset so are its uniform and normal random number generators.
Definition at line 75 of file FGJSBBase.h.
#include <FGJSBBase.h>
Public Member Functions | |
| RandomNumberGenerator (unsigned int seed) | |
| Constructor allowing to specify a seed. | |
| RandomNumberGenerator (void) | |
| Default constructor using a seed based on the system clock. | |
| double | GetNormalRandomNumber (void) |
| Get a random number which probability of occurrence is following Gauss normal distribution with a mean of 0.0 and a standard deviation of 1.0. | |
| double | GetUniformRandomNumber (void) |
| Get a random number which probability of occurrence is uniformly distributed over the segment [-1;1(. | |
| void | seed (unsigned int value) |
| Specify a new seed and reinitialize the random generation process. | |
|
inline |
Default constructor using a seed based on the system clock.
Definition at line 78 of file FGJSBBase.h.
|
inline |
Constructor allowing to specify a seed.
Definition at line 84 of file FGJSBBase.h.
|
inline |
Get a random number which probability of occurrence is following Gauss normal distribution with a mean of 0.0 and a standard deviation of 1.0.
Definition at line 97 of file FGJSBBase.h.
|
inline |
Get a random number which probability of occurrence is uniformly distributed over the segment [-1;1(.
Definition at line 94 of file FGJSBBase.h.
|
inline |
Specify a new seed and reinitialize the random generation process.
Definition at line 87 of file FGJSBBase.h.