|
Yasiu Math 1
Collection of mathematic functions that help create game mechanics and procedural tools
|
Random number generator. Seedable. Gives better random values than epic generator. More...
#include <SquirrelRNG.h>
Public Member Functions | |
| void | InitBP (int seed, int position=0) |
| Modify internal values to custom. | |
| int | GetNextInt (int min, int max) |
| Move position by 1 and return random value as integer in range <min, max>. | |
| int | GetCurrentInt (int min, int max) const |
| Return random value scaled to integer range <min, max> at current position. | |
| double | GetNextDouble () |
| Move position by 1 and return double in range <0, 1>. | |
| double | GetCurrentDouble () const |
| Return last random double in range <0, 1>. | |
| void | SetPosition (int new_position) |
| Set generator position. | |
| void | OffsetPosition (int offset=1) |
| Offset current position, can be positive and negative. | |
| void | SetSeed (int new_seed) |
| Set seed noise seed. | |
| void | SetNoiseVariant (int newVariant=0) |
| Internal noise variants (it is not initialized), default=0, max=5 Invalid variants will use default noise. | |
| void | ResetSeedPos () |
| Reset to internal initial values. | |
| virtual void | Serialize (FArchive &Ar) override |
| Serialization of RNG Object. | |
Protected Attributes | |
| int | m_variant {0} |
| variable related to selected noise variant | |
Random number generator. Seedable. Gives better random values than epic generator.
| void USquirrel13_RNG::InitBP | ( | int | seed, |
| int | position = 0 ) |
Modify internal values to custom.
This function provides access to change private variables for C++ object which is not accessible in Blueprints.
| void USquirrel13_RNG::OffsetPosition | ( | int | offset = 1 | ) |
Offset current position, can be positive and negative.
Position + Offset