What is the RNG algorithm for VBMath.Rnd

Ken Jutz 1 Reputation point
2020-09-22T04:16:37.667+00:00

What is the random number generator algorithm used for VBMath.Rnd? Is it utilizing System.Random?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,869 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Viorel 114.5K Reputation points
    2020-09-23T10:39:29.923+00:00

    If you search using https://www.bing.com/search?q=VBMath+Rnd+Clone, you will probably find a sample class which pretends to be an exact replacement. To check this, call Randomize with the same parameters in both cases, then check if the generated pseudo-random sequences are the same.

    1 person found this answer helpful.
    0 comments No comments

  2. Dylan Zhu-MSFT 6,406 Reputation points
    2020-09-22T10:23:42.253+00:00

    Hi KenJutz,

    Maybe you could refer to the files: VBMath.cs and System.Random in .NET framework. The types of parameters and return values are different. Although, their implementation may have some same points, it seems that VBMath.Rnd doesn't utilize System.Random.

    Best Regards,
    Dylan

    0 comments No comments