Public Member Functions | |
| bool | IsNull () const |
| Always returns false. More... | |
| ASPOSECPP_SHARED_API | Random () |
| Initializes a new instance, using a time-dependent default seed value. More... | |
| ASPOSECPP_SHARED_API | Random (int32_t seed) |
| ASPOSECPP_SHARED_API int32_t | Next () |
| Returns a nonnegative random number less then int32 max value. More... | |
| ASPOSECPP_SHARED_API int32_t | Next (int32_t maxValue) |
| ASPOSECPP_SHARED_API int32_t | Next (int32_t minValue, int32_t maxValue) |
| ASPOSECPP_SHARED_API void | NextBytes (const ArrayPtr< uint8_t > &buffer) |
| ASPOSECPP_SHARED_API double | NextDouble () |
| Returns a random number between 0.0 and 1.0. More... | |
| Random & | operator= (std::nullptr_t) |
Represents a pseudo-random number generator. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
| ASPOSECPP_SHARED_API System::Random::Random | ( | ) |
Initializes a new instance, using a time-dependent default seed value.
| ASPOSECPP_SHARED_API System::Random::Random | ( | int32_t | seed | ) |
Initializes a new instance of the System.Random class, using the specified seed value.
| seed | The seed used to generate a pseudo-random number sequence |
|
inline |
Always returns false.
| ASPOSECPP_SHARED_API int32_t System::Random::Next | ( | ) |
Returns a nonnegative random number less then int32 max value.
| ASPOSECPP_SHARED_API int32_t System::Random::Next | ( | int32_t | maxValue | ) |
Returns a nonnegative random number less than the specified maximum.
| maxValue | Values generated by the method will be less than this value |
| ASPOSECPP_SHARED_API int32_t System::Random::Next | ( | int32_t | minValue, |
| int32_t | maxValue | ||
| ) |
Returns a random number within the specified range.
| minValue | Values generated by the method will be greater than this value |
| maxValue | Values generated by the method will be less than this value |
| ASPOSECPP_SHARED_API void System::Random::NextBytes | ( | const ArrayPtr< uint8_t > & | buffer | ) |
Fills the elements of the specified array of bytes with random numbers.
| buffer | The array to fill |
| ASPOSECPP_SHARED_API double System::Random::NextDouble | ( | ) |
Returns a random number between 0.0 and 1.0.
|
inline |
Effectively does nothing.