alet 0.1.1

Simple and stright-forward random generator (wrapper to rand crate) - Inpired by the Python's random module
Documentation
  • Coverage
  • 85.71%
    6 out of 7 items documented0 out of 6 items with examples
  • Size
  • Source code size: 5.18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 136.51 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • ishyv/alet
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ishyv

Alet

A simple and straightforward random number generator library for Rust, inspired by Python's random module.

Usage

 // Generate a random float in the range [0.0, 1.0)
random();

// Generate a random integer in the range [a, b]
randint(1, 10);

// Generate a random unsigned integer in the range [a, b]
randuint(1, 10);

// Generate a random float in the range [a, b]
uniform(1.0, 10.0);

// Choose a random element from a sequence
choice(&[1, 2, 3, 4, 5]);

// Shuffle a sequence in-place
shuffle(&mut [1, 2, 3, 4, 5]);