easy_rand

Crates.ioeasy_rand
lib.rseasy_rand
version0.1.0
sourcesrc
created_at2023-10-09 19:14:08.764581
updated_at2023-10-09 19:14:08.764581
descriptionSmall Rust wrapper library for calling POSIX's srand() and rand() functions.
homepage
repositoryhttps://github.com/helderTZ/easy_rand
max_upload_size
id998361
size3,833
(helderTZ)

documentation

README

easy_rand

Small Rust wrapper library for calling POSIX's srand() and rand() functions.

Provides:

  • c_srand(seed: u32) : sets initial seed value by calling srand()
  • c_rand() : returns a pseudo-random number by calling rand()
  • c_rand_range(min: i32, max: i32) : returns a pseudo-random number in the range [min, max[ via the following algorithm: rand() % (max - min) + min
Commit count: 4

cargo fmt