0.0.8 • Published 2 years ago

randomcalculation v0.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Randomcalculation

A random number calculation library

Tips: This package was actually on npmjs.org for a few years, but due to a mistake by npmjs, it was deleted and could not be restored. npmjs suggested that I re-upload.

Usage

First, install it from NPM

npm install randomcalculation

Second, import & code

const rn = require("randomcalculation");
console.log(rn.randomcalculation(1, 5, 1, 9));

Parameter Description

There are four parameters here, which define the value range of the two numbers to be calculated.

  • The first, the second is the minimum and maximum of the first number

  • The third, the fourth is the minimum and maximum of the second number

Return result

The return result like following

{result: 1, equation: '1+0'}

Tips

If 0 is used as a divisor, you will get the error like following

{ error: false, msg: '0 cannot be used as a divisor' }

License

MIT

0.0.8

2 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago