proyect-1a-math
v1.1.0
Published
Project od math, for trining nodejs and upload to NPM
Downloads
1
Readme
Math operations
Module for realice basic operations
Instalation
Follow next instructions
npm i proyect-1a-math
Usage
Follow next instructions
// Import package and use it
const m = require('.');
// sum
let n = 2;
console.log(m.mul(n, 1)); => 3
console.log(m.mul(n, 2)); => 4
console.log(m.mul(n, 3)); => 5
// substraction
let n = 2;
console.log(m.mul(n, 1)); => 1
console.log(m.mul(n, 2)); => 0
console.log(m.mul(n, 3)); => -1
// multiplication
let n = 2;
console.log(m.mul(n, 1)); => 2
console.log(m.mul(n, 2)); => 4
console.log(m.mul(n, 3)); => 6
// division
let n = 2;
console.log(m.mul(n, 1)); => 2
console.log(m.mul(n, 2)); => 1
console.log(m.mul(n, 3)); => 0.666