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
- Host: GitHub
- URL: https://github.com/koji/deno-mtrand
- Owner: koji
- Created: 2020-07-08T03:52:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-16T04:58:30.000Z (almost 6 years ago)
- Last Synced: 2025-11-03T09:27:14.724Z (8 months ago)
- Topics: deno, denoland, random, typescript
- Language: TypeScript
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)