mathematic

A lib to use mathematical operators


Keywords
ari, arithmetic, math, mathematical, mathematics, sum, somar, somatório, subtract, subtrair, subtração, divide, dividir, divizão, multiply, multiplicar, multiplicação
License
MIT
Install
npm install mathematic@1.0.1

Documentation

cli-mathematic

A lib to use mathematical operators

Note: need node >= 6

Usage

const math = require('mathematic');

math.sum(1, 2); // 3
/* You can use arrays */
math.sum([1,2,3,'4',66,74]); // 150
math.sub(56,44); // 12
math.multi(14, 37); // 518
math.div(3, 4); // 0.75
```
## API

### sum(numbers)

|  Parameter  |          Type       |           Value               |
|-------------|---------------------|-------------------------------|
|   numbers   |   number *or* array |  any number (in array or not) |

### sub(numbers)

|  Parameter  |          Type       |           Value               |
|-------------|---------------------|-------------------------------|
|   numbers   |   number *or* array |  any number (in array or not) |

### multi(numbers)

|  Parameter  |          Type       |           Value               |
|-------------|---------------------|-------------------------------|
|   numbers   |   number *or* array |  any number (in array or not) |

### div(numbers)

|  Parameter  |          Type       |           Value               |
|-------------|---------------------|-------------------------------|
|   numbers   |   number *or* array |  any number (in array or not) |