crandom
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

crandom

A simple random number generator based on circular equations.

Difficulty is adjustable by changing the power of the equation.

Usage

Importing

with Typescript

import crandom from 'crandom';

with Vanilla Javascript

const { default: crandom } = require('crandom');

Generating

Generate a random number between 1 and 5 with difficulty 3:

const num = crandom.rand(1, 5);
num // 4

Generate a random number between 0 and 100 with difficulty 5:

const num = crandom.rand(0, 100, 5);
num // 9

Readme

Keywords

Package Sidebar

Install

npm i crandom

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

24.1 kB

Total Files

11

Last publish

Collaborators

  • alperb