An open API service indexing awesome lists of open source software.

https://github.com/koji/deno-mtrand

mt19937 for Deno
https://github.com/koji/deno-mtrand

deno denoland random typescript

Last synced: 2 months ago
JSON representation

mt19937 for Deno

Awesome Lists containing this project

README

          

# 🦕 deno-mtrand

[Deno](https://deno.land) module starter repository.

## Usage

```typescript
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

```bash
# unit tests
deno ./test.ts
```

## Format code

```bash
deno fmt **/*.ts
```

## Resources

- [Deno Website](https://deno.land)
- [Deno Style Guide](https://github.com/denoland/deno/blob/master/docs/contributing/style_guide.md)
- [Deno Gitter](https://gitter.im/denolife/Lobby)