Random Numbers and related scripts

Does anyone know how to implement the following? I work with Javascript at the moment so C# is new to me.

http://www.unifycommunity.com/wiki/index.php?title=CustomRandom

I tried this in Javascript:

function Update ()

{
    var randNum = CustomRandom();
    Debug.Log(randNum);
}

I did that because I can't attach the CustomRandom script to an object.

Any help is appreciated. Thanks.

Is there any reason why you can't use the normal random number generators?

/* generate a random number between 0 and 1 */

var randomNumber = Random.value;

/* generate a random number between 0 and 10 */

var randomNumber = 10 * ( Random.value );

/* generate a random number between 10 and 20 */

var randomNumber = Random.Range(10, 20);

Also...

If you're going to try to use that code, you probably want to use calls to functions like this:

 /* instantiate a random number generator */

 CustomRandom randomNumberGenerator = new CustomRandom();

 /* call some functions to generate random numbers */

 float randomNumber = randomNumberGenerator.NextDouble();
 float notSoRandom  = randomNumberGenerator.about(5, 1.2);

Your code looks like it tries to call the constructor and assign the result (which is nothing) to a variable.

What is the question exactly? Your code is OK as far as it goes, but you'd want to use a property of your randNum variable somehow. That wiki code doesn't really seem to be documented though. You'd be better off using System.Random.