Random (VRD) 🦀 v0.0.7
Release v0.0.7 - 2024-05-04 - May the 4th Be With You !
Random (VRD) v0.0.7 🦀
A Rust library for generating high-quality random numbers based on the
Mersenne Twister algorithm.
Part of the Mini Functions family of libraries.
• Website • Documentation • Report Bug • Request Feature • Contributing Guidelines
Overview 📖
Random (VRD)
is a Rust library for generating high-quality random numbers based on the Mersenne Twister algorithm.
The Mersenne Twister is a pseudorandom number generator (PRNG) that is often used in computer simulations and games. It is a fast and reliable PRNG.
The Random (VRD) is used to generate random numbers using the Mersenne Twister algorithm. It generates pseudorandom integers uniformly distributed in 0..(2^32 - 1) starting from any odd seed in 0..(2^32 - 1).
The index is incremented after each random number is generated. When the index reaches 624, the array is reinitialized and the index is reset to 0.
Features ✨
- Create new random number generator and seed it with a value.
- Design for speed and efficiency in mind.
- Generate random 32-bit unsigned integer within a given range.
- Provide random numbers of different types, including booleans, bytes, chars, doubles, floats, integers, and unsigned integers.
- Mutate the state of the random number generator.
- Produce pseudo-random number sequences that are different from each other.
- Regulate the randomness of the generated numbers, including the seed value and the number of bits used.
- Select a random element from a slice of values.
Changelog 📚
This release includes several improvements, bug fixes, and new features to the vrd
crate. Here's a summary of the changes:
Features
- Added
MersenneTwisterConfig
struct along with corresponding tests. This struct provides configuration options for the Mersenne Twister RNG.
Bug Fixes
- Fixed CI jobs and added new ones to ensure better reliability of the CI pipeline.
- Resolved an issue where
gen
keyword conflicted with the 2024 edition, now usingr#gen
as a raw identifier.
Documentation
- Updated examples documentation and sorted them for better clarity.
- Improved
log_entry_async
function and updated unit tests accordingly. - Updated crate example code and documentation, along with the addition of new functions.
Tests
- Added new test case
test_new_custom_invalid_parameters
to ensure robustness of custom parameter handling. - Expanded test coverage for
random.rs
module to enhance reliability and correctness.
Style
- Fixed formatting issues and applied consistent code styling throughout the project.
Merge pull request #41 from sebastienrousseau/feat/vrd
What's Changed
- v0.0.7 by @sebastienrousseau in #41
Full Changelog: v0.0.6...v0.0.7