This commit is contained in:
gu
2016-02-01 10:39:50 +01:00
parent e0dbfeeb39
commit a5665d15ab
+4 -4
View File
@@ -1,11 +1,11 @@
/// <reference path="random-js.d.ts"/>
/// <reference path="node/node.d.ts"/>
/// <reference path="../node/node.d.ts"/>
// Examples taken from the documentation at https://github.com/ckknight/random-js
import Random = require("random-js");
// create a Mersenne Twister-19937 that is auto-seeded based on time and other random values
import Engine = random.Engine;
import Random = random.Random;
var engine: Engine = Random.engines.mt19937().autoSeed();
// create a distribution that will consistently produce integers within inclusive range [0, 99].
var distribution: Function = Random.integer(0, 99);