csRandomFloatGen Class Reference
Fast simple random number generator for floating point values. More...
#include <csutil/floatrand.h>
Public Member Functions | |
csRandomFloatGen (unsigned int seed) | |
Initialize the random number generator using given seed. | |
csRandomFloatGen () | |
Initialize the random number generator using current time(). | |
float | Get (float min, float max) |
Get a floating point random number in range min <= num < max . | |
float | Get (float max) |
Get a floating point random number in range 0 <= num < max . | |
float | Get () |
Get a floating-point random number in range 0 <= num < 1. | |
float | GetAngle () |
Get a random angle in range 0 <= num < 2*PI radians. | |
void | Initialize (unsigned int new_seed) |
Initialize the RNG using the supplied seed value. | |
void | Initialize () |
Initialize the RNG using current time() as the seed value. |
Detailed Description
Fast simple random number generator for floating point values.
Definition at line 32 of file floatrand.h.
Constructor & Destructor Documentation
|
Initialize the random number generator using current time().
Definition at line 39 of file floatrand.h. |
|
Initialize the random number generator using given seed.
Definition at line 42 of file floatrand.h. |
Member Function Documentation
|
Get a floating point random number in range
Definition at line 68 of file floatrand.h. |
|
Get a floating point random number in range 0 <= num <
Definition at line 62 of file floatrand.h. |
|
Get a floating-point random number in range 0 <= num < 1.
Definition at line 52 of file floatrand.h. |
|
Get a random angle in range 0 <= num < 2*PI radians.
Definition at line 75 of file floatrand.h. |
|
Initialize the RNG using the supplied seed value.
Definition at line 48 of file floatrand.h. |
|
Initialize the RNG using current time() as the seed value.
|
The documentation for this class was generated from the following file:
- csutil/floatrand.h
Generated for Crystal Space by doxygen 1.4.6