1.3.0 • Published 5 years ago

@nevtay/math_2 v1.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

Math

A simple math library

Install

npm install @nevtay/math_2

Usage

Import

const math = require('@nevtay/math_2')

Addition

const addition = math.add(args1, args2[, ...args])

Subtraction

const minus = math.minus(args1, arg2)

Multiplication

const multiply = math.multiply(args1, arg2[, ...args])

Division

const divide = math.divide(dividend, divisor)

Exponential

const powOf = math.powOf(base, exponent)

Multiplier

To create a custom multiplier, store it as a variable
Examples:

const double = math.multiplyBy(2)
const triple = math.multiplyBy(3)

To use your multiplier, simply call your variable with a number parameter

double(2) // returns 4
triple(2) // returns 6

Measure

A function that takes up to three parameters and multiplies them together
Empty parameters will default to a value of 1

const one = math.measure()()() // returns 1 const area = math.measure(10)(2)() // returns 20 const volume = math.measure(2)(4)(6) // returns 48

1.3.0

5 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.4

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago

1.0.3

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago