7.4.0 • Published 1 year ago

@vinayakpalve/mathoperators v7.4.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

@vinayakpalve/mathoperators

"The package '@vinayakpalve/mathoperators' can perform ADDITION, SUBTRACTION, MULTIPLICATION, DIVISION, and SORTING operations on n numbers at a time."

Install

$ npm i @vinayakpalve/mathoperators

Usage

const operators = require("@vinayakpalve/mathoperators");

//=> For Addition of n Numbers
let numbers = [12,302,1,2,3,4,7]
let output = operators.add(numbers) 
console.log(output) //=> 331

//=> For Substraction of n Numbers
let numbers = [12,302,1,2,3,4,7]
let output = operators.sub(numbers) 
console.log(output) //=> -307

//=> For Multiplication of n Numbers
let numbers = [12,302,1,2,3,4,7]
let output = operators.mul(numbers) 
console.log(output) //=> 608832

//=> For Division of n Numbers
let numbers = [12,302,1,2,3,4,7]
let output = operators.div(numbers) 
console.log(output) //=> 0.00023651844843897824

//=> For getting Remainder of two integers that have been divided
let numbers = [302,12]
let output = operators.modulus(numbers)
console.log(output) //=> 2

//=> For calculating first operand to the power of the second operand
let numbers = [2,12]
let output = operators.pow(numbers)
console.log(output) //=> 4096

//=> For Sorting of n Numbers
let numbers = [12,302,1,2,3,4,7]
let output = operators.sort(numbers) 
console.log(output) //=> [1, 2, 3, 4, 7, 12, 302]

//=> For Reverse Sorting of n Numbers
let numbers = [12,302,1,2,3,4,7]
let output = operators.revSort(numbers) 
console.log(output) //=> [302, 12, 7, 4, 3, 2, 1]
7.4.0

1 year ago

7.3.7

1 year ago

7.3.6

1 year ago

7.3.5

1 year ago

7.3.4

1 year ago

7.3.3

1 year ago

7.3.2

1 year ago

7.3.1

1 year ago

7.3.0

1 year ago

7.2.0

1 year ago

7.1.0

1 year ago

7.0.0

1 year ago

6.0.0

1 year ago

5.0.0

1 year ago

4.0.0

1 year ago

3.0.0

1 year ago

2.0.0

1 year ago

1.0.0

1 year ago