1 unstable release
Uses new Rust 2024
new 0.1.2 | Apr 3, 2025 |
---|
#6 in #non-deterministic
Used in 4 crates
(3 directly)
105KB
552 lines
Aloe Random
Aloe Random is a highly versatile and efficient random number generator implemented in Rust. It facilitates the creation and manipulation of random numbers, geared toward developers requiring deterministic or non-deterministic random sequences in their systems.
Key Features
- Seed Management: Initialize with a specific seed for predictable sequences or generate one using system properties for enhanced randomness.
- Various Outputs: Generate integers, floats, Booleans, and BigIntegers across different ranges seamlessly.
- Thread Safety: Use local instances for thread-safe operations, isolating random number streams across different use cases.
- Memory Operations: Fill memory buffers with random values efficiently.
Usage
Create a Random
instance with either a default or specified seed:
let mut rng = Random::default(); // Uses a randomly generated seed
let mut rng_with_seed = Random::new(42); // Uses the seed '42'
Generate various types of random values as required:
let random_int = rng.next_int();
let random_float = rng.next_float();
let random_bool = rng.next_bool();
let random_int_in_range = rng.next_int_with_range(0..10);
Thread Safety
For multithreaded applications, instantiate separate Random
objects in each thread to prevent corruption of randomly generated values.
License
This crate is licensed under GPL-3.0. For more information, visit the GitHub repository.
Disclaimer: This README.md file was generated by an AI model and may not be 100% accurate; however, it should be quite useful.
This crate is a translation of the JUCE module.
JUCE is a c++ software framework for developing high performance audio applications.
Usage falls under the GPLv3 as well as the JUCE commercial license.
See github.com/juce-framework/JUCE and the JUCE license page for details.
This crate is in the process of being translated from c++ to rust. For progress updates, please see the workspacer rust project. designed specifically for rust projects.
Dependencies
~14–23MB
~379K SLoC