22 releases (10 stable)

5.1.0 Jan 26, 2025
5.0.0 Sep 1, 2023
4.0.0-alpha.3 Aug 26, 2020
3.0.1 Oct 4, 2019
0.890.0 May 14, 2018

#2078 in Algorithms

Download history 110/week @ 2025-10-09 135/week @ 2025-10-16 145/week @ 2025-10-23 114/week @ 2025-10-30 129/week @ 2025-11-06 111/week @ 2025-11-13 124/week @ 2025-11-20 106/week @ 2025-11-27 94/week @ 2025-12-04 97/week @ 2025-12-11 91/week @ 2025-12-18 74/week @ 2025-12-25 110/week @ 2026-01-01 39/week @ 2026-01-08 98/week @ 2026-01-15 99/week @ 2026-01-22

346 downloads per month
Used in 11 crates (9 directly)

Zlib OR Apache-2.0 OR MIT

26KB
473 lines

randomize

Pseudo-random number generator crate.

NOT FOR CRYPTOGRAPHIC PURPOSES.


lib.rs:

Pseudo-random number generator crate.

NOT FOR CRYPTOGRAPHIC PURPOSES.

Using This Crate

  • Create a [PCG32] or [PCG32K] value as your generator.
    • If you enable this crate's getrandom cargo feature then both types will have constructor functions to handle seeding a generator from the getrandom function.
  • Call next_u32 on the generator to get pseudo-random u32 values.
  • At your option, import the [Gen32] trait for various extension methods.

Dependencies

~175KB