D is a modern language that offers the convenience of Python at the speed of C++. While D is constantly evolving, its support for scientific research is still sparse. This project will be focused on improving Mir (Phobos’s upcoming science module) by adding a universal non-uniform random number generator (RNG) based on Tinflex. In contrast to the standard acceptance-rejection method, Tinflex requires only knowledge of the probability density function, its first two derivatives and a partitioning in intervals with at most one inflection point and is thus easier to use. Moreover a lot of common non-uniform random distributions will be added.