mathematic
v1.0.1
Published
A lib to use mathematical operators
Downloads
12
Maintainers
Readme
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) |