@nehasharma/mathfun
v2.8.0
Published
NPM for basic math functions
Downloads
4
Maintainers
Readme
mathfun
NPM for doing basic math functions
#NPM to take care of your maths calculations in your program.
- isEven
It will return if the number provided is even or not.
Expect 1 parameter only.
- isMultiple
It will return if the provided numbers is multiple or not.
Expect 2 parameters.
mathFun.isMultiple(25,5); // it will check if 25 is multiple of 5 or not.
- square
It will return the square of the provided number.
Expect 1 parameter only.
- printTable
It will return the provided number table upto 10.
Expect 1 parameter only.
- cube
It will return the cube of the provided number.
Expect 1 parameter only.
- power
It will return the result of base * power provided.
Expect 2 parameters.
mathFun.power(25,5); // 25 is the base and 5 is the power.
- circleArea
It will return the area of the circle based on the provided parameter.
Expect 1 parameter only.
- circlePerimeter
It will return the perimeter of the circle based on the provided parameter.
Expect 1 parameter only.
- RecPerimeter
It will return the area of the rectangle based on the provided parameter.
Expect 1 parameter only.
- RecArea
It will return the area of the rectangle based on the provided parameter.
Expect 1 parameter only.
- squareArea
It will return the area of the square based on the provided parameter.
Expect 1 parameter only.
- squarePerimeter
It will return the perimeter of the square based on the provided parameter.
Expect 1 parameter only.
- reverseNumber
It will return the reverse of the input parameter.
Expect 1 parameter only.
How to use?
Step 1 : npm install @nehasharma/mathfun
Step 2 : (in your code file) const mathFun = require('@nehasharma/mathfun');
mathFun.circlePerimeter(5);
mathFun.square(5);
What's in future?
More calculations will be added
Found some issue? Mail at [email protected]