@useless-javascript-modules/math

3.0.0 • Public • Published

@useless-javascript-modules/math

This useless javascript module does mathematical operations on numbers.

Example:

const math = require('@useless-javascript-modules/math')

math.add(1,2) /* = 3 */
math.subtract(6.2,4) /* = 2.2 */
math.multiply(2,3) /* = 6 */
math.divide(10,3) /* = 3.3333.... */
math.pow(3,3) /* = 27 */
math.root(27,3) /* = 3 */

Supported Math Operations

add

Add the first argument to the second argument

subtract

Subtract the second argument from the first argument.

multiply

Multiply the first argument by the second argument

divide

Divide the first argument by the second argument

pow

The first argument raised to the power of the second argument

root

The first argument to the root of the second argument

Change Log

  • 3.0 - Changed API to make it "better"
  • 2.1 - Added pow and root operations
  • 2.0 - Operations now accurately handles fractional numbers
  • 1.1 - Added support for multiply and divide operations
  • 1.0 - initial release

Readme

Keywords

none

Package Sidebar

Install

npm i @useless-javascript-modules/math

Weekly Downloads

1

Version

3.0.0

License

MIT

Unpacked Size

3.17 kB

Total Files

4

Last publish

Collaborators

  • robilars-amzn