#numbers #generator #xorshift128 #psuedo

xorshift128plus

Rust implementation of the psuedo random number generator xorshift128+

2 releases

Uses old Rust 2015

0.1.1 Feb 11, 2017
0.1.0 Feb 11, 2017

#835 in #generator

MIT license

6KB
80 lines

XorShift128Plus

Rust implementation of the psuedo random number generator xorshift128+.

📔 Documentation

Usage

extern crate xorshift128plus;

use xorshift128plus::XorShift128Plus;

fn main() {
  let mut rng = XorShift128Plus::from_u32(4293262078);

  println!("First random float: {}", rng.next());
  println!("Second random float: {}", rng.next());
}

No runtime deps