valve-sdk13-rng 0.1.0

A port of Valve's SDK13 Uniform random number generator in Rust.
Documentation
  • Coverage
  • 11.11%
    1 out of 9 items documented1 out of 6 items with examples
  • Size
  • Source code size: 6.08 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 344.49 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • saskenuba

valve-sdk13-rng

This is a direct translation to Rust of the original Source 2013 SDK Uniform Random Number Generator from Valve, ported to golang by @Step7750

Thanks Step7750 for taking the time to reverse engineer it, and taking the time of how skins work outside of the game.

Usage

use valve_sdk13_rng::UniformRandomStream;

let mut gen = UniformRandomStream::with_seed(72);
let res = gen.random_f64(0_f64, 1_f64);
assert_eq!(0.543_099_8, res);

More in-depth links

[PSA] How Paint Seed Actually Works (Technical)