x/mtrand@v1.0.0

mt19937 for Deno
GitHub Stars
0
Latest
import * as mtrand from "https://deno.land/x/mtrand@v1.0.0/mod.ts";

🦕 deno-mtrand

Deno module starter repository.

Usage

import { mtrand } from "https://deno.land/x/mtrand/mod.ts";

const rand = mtrand(0);
for(let i=0; i<10; i++) {
  console.log(`${i} - ${rand.next().value}`)
}

castUint32

cast number to Uint32 parameter number

mtrand

generate number with mt19937 method parameter number

Test

# unit tests
deno ./test.ts

Format code

deno fmt **/*.ts

Resources