Fully managed library providing various random number generators and distributions.
     More precisely, this library offers four generators (ALF, MT19937, Standard, XorShift128), five discrete distributions (Bernoulli, Binomial, DiscreteUniform, Geometric, Poisson) and twenty continuous distributions (like Normal, Exponential and so on); moreover, it offers a Python-style random class (TRandom).
     All the hard work behind this library was done by Stefan Troschütz, and for which I thank him very much. What I am doing with his great project, is simply to refactor and improve his code, while offering the new Python-style random class.
     You can find the modified source code and the available documentation at this address:

There is a newer version of this package available.
See the version list below for details.
Install-Package Troschuetz.Random -Version
dotnet add package Troschuetz.Random --version
<PackageReference Include="Troschuetz.Random" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Troschuetz.Random --version
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Troschuetz.Random,"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Troschuetz.Random as a Cake Addin
#addin nuget:?package=Troschuetz.Random&version=

// Install Troschuetz.Random as a Cake Tool
#tool nuget:?package=Troschuetz.Random&version=
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

This can be considered a stable release, excluding the class TRandom, which is new and incomplete.
     As of, TRandom exposes all other distributions, is more documented and tested.
     WARNING: Until further notice, class TRandom has to be considered not so stable.
     WARNING: This package is young, and the owner is quite new to the NuGet system. If you find any problem, please contact the owner.


This package has no dependencies.

NuGet packages (11)

Showing the top 5 NuGet packages that depend on Troschuetz.Random:

Package Downloads
Package Description
Roguelike/2D game utility library.
Just my common library
Randomizer for NDice using Troschuetz.Random
Roguelike/2D game utility library.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Troschuetz.Random:

Repository Stars
.NET Standard roguelike library in C#. Features many algorithms and data structures pertinent to roguelike/2D game developers, specifically designed to be minimally intrusive upon the developer's architecture.
Brain Simulator is a platform for visual prototyping of artificial intelligence architectures.

Version History

Version Downloads Last updated
5.0.1 8,772 7/26/2020
4.4.0 1,462 7/22/2020
4.3.3 509 7/21/2020
4.3.1 37,251 9/8/2019
4.3.0 68,065 3/11/2018
4.2.0 6,093 10/28/2017
4.1.3 12,928 1/8/2017
4.1.2 839 12/25/2016
4.1.1 932 12/18/2016
4.0.8 1,094 12/4/2016
4.0.7 1,639 10/30/2016
4.0.5 15,441 8/7/2016
4.0.4 27,427 3/26/2016
4.0.3 18,660 10/11/2015
4.0.0 1,651 8/18/2015
3.3.0 757 8/9/2015
3.2.0 1,949 9/6/2014
3.1.0 756 9/6/2014
3.0.0 735 9/5/2014
2.1.1 2,047 5/25/2014
2.0.0 1,059 1/18/2014
1.7.0 851 11/20/2013
1.5.1 912 7/8/2013 905 4/7/2013
1.5.0 867 4/6/2013
1.4.3 922 11/23/2012 852 11/7/2012 882 11/4/2012
Show less