rng-pack 0.2.2

rng variety pack
Documentation

RNG Pack

A collection of random number generators.

This crate provides implementations of various pseudo-random number generators (PRNGs), including:

  • Mersenne Twister: [mt19937::Mt19937] (32-bit) and [mt1993764::Mt1993764] (64-bit).
  • PCG: [pcg32::Pcg32] (Permuted Congruential Generator).
  • Philox: [philox32::Philox32] (4x32) and [philox64::Philox64] (2x64), counter-based RNGs.
  • Twisted GFSR: [twisted_gfsr::TwistedGFSR].
  • Xorshift: [xorshift32::Xorshift32], [xorshift64::Xorshift64], and [xorshift128::Xorshift128].

Each generator supports generating uniform random numbers for various types (u32, u64, f32, f64) and ranges.

C API

This crate also exports C-compatible functions for creating, using, and freeing these generators, allowing them to be used from other languages.