Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacobbubu/rngmt
https://github.com/jacobbubu/rngmt
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jacobbubu/rngmt
- Owner: jacobbubu
- License: mit
- Created: 2020-07-12T03:51:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T11:16:46.000Z (about 2 years ago)
- Last Synced: 2025-01-02T13:38:44.145Z (26 days ago)
- Language: TypeScript
- Homepage:
- Size: 1.15 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# @jacobbubu/rngmt
[![Build Status](https://github.com/jacobbubu/rngmt/workflows/Build%20and%20Release/badge.svg)](https://github.com/jacobbubu/rngmt/actions?query=workflow%3A%22Build+and+Release%22)
[![Coverage Status](https://coveralls.io/repos/github/jacobbubu/rngmt/badge.svg)](https://coveralls.io/github/jacobbubu/rngmt)
[![npm](https://img.shields.io/npm/v/@jacobbubu/rngmt.svg)](https://www.npmjs.com/package/@jacobbubu/rngmt/)> Implementation of mersenne-twister random number generation algorithm with TypeScript
## Intro.
This module was modified from [rng](https://github.com/jhermsmeier/rng.js) for two reasons:
- Comes with TypeScript type declaration
- Help my colleagues migrate to other programming languages with minimal effort## Usage
``` ts
import { RNG } from '@jacobbubu/rngmt'const rng = new RNG() // or send a seed number as parameter
rng.random() // returns a tempered pseudorandom number between 0 and 1
rng.range(0, 100) // returns a number between 0 and 100
```## License
MIT