Fixed C# native version, implemented MersenneTwister