Skip to content

A motley assortment of psuedo-random number generators

License

Notifications You must be signed in to change notification settings

maloquacious/prng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PRNG

PRNG provides simple random number generators for testing.

Usage:

// create a new LCG generator
lcg32 := prng.LCG32(0)

// roll 5 6-sided dice
r1 := sfc32.Roll(5, 6)

// create a new SFC generator
sfc32 := prng.SFC32(0, 12345, 0, 1)

// roll 5 6-sided dice
r2 := sfc32.Roll(5, 6)

Features

  • 32-bit generators
  • LCG and SFC implementations

Installation

No installation required - just import the package into your program.

import github.com/mdhender/prng

Contribute

  • Issue Tracker: github.com/mdhender/prng/issues
  • Source Code: github.com/mdhender/prng

Support

If you are having issues, please let us know.

License

The project is licensed under the MIT license.

Thanks

Special thanks to Eric Holscher and Write The Docs.

LCG32

Constants for LCG32 from Open Adventure.

SFC32

Code for SFC32 is from SimBlob.

About

A motley assortment of psuedo-random number generators

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages