Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
FXRandom provides a thread-safe random number generator with a period of around 1.84E19. More...
#include <FXRandom.h>
Public Member Functions | |
FXRandom () | |
Construct random generator with default seed value. | |
FXRandom (FXulong s) | |
Construct random generator with given seed s. More... | |
FXRandom (const FXRandom &s) | |
Initialize this random generator with the state of another. | |
FXRandom & | operator= (const FXRandom &s) |
Assignment state from another random generator. | |
FXulong | next () |
Generate next state of the random generator. | |
void | seed (FXulong s) |
Change state of random generator with new seed s. | |
FXulong | getState () const |
Get state of random generator. | |
void | setState (FXulong s) |
Set state of random generator. More... | |
FXulong | randLong () |
Draw random unsigned long, uniformly distributed. | |
FXfloat | randFloat () |
Draw random float, uniformly distributed between 0 and 1. | |
FXdouble | randDouble () |
Draw random double, uniformly distributed between 0 and 1. | |
FXRandom provides a thread-safe random number generator with a period of around 1.84E19.
FX::FXRandom::FXRandom | ( | FXulong | s | ) |
Construct random generator with given seed s.
A good source of seed values may be the FXThread::time() function.
|
inline |
Set state of random generator.
Ensure state is not zero!.
Copyright © 1997-2022 Jeroen van der Zijp |