1.5.0 • Published 1 year ago

math-help v1.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Math Help

math-help is a NPM package which helps in basic and advanced Math calculations.

Changes Made

  • Made Classes for different types functions

How to install this package?

npm i math-help

Examples

Arithmetic Class

const { Arithmetic } = require("math-help");

let math = new Arithmetic();

console.log(math.add(12, 15));
console.log(math.subtract(4, 3));
console.log(math.multiply(12, 12));
console.log(math.divide(130, 3));
console.log(math.remainder(130, 2));
console.log(math.exponent(2, 3));

2D Shapes Perimeter

const { ShapesPerimeter2D } = require("math-help");

let math = new ShapesPerimeter2D();

console.log(math.rectanglePerimeter(10, 8, "cm"));
console.log(math.squarePerimeter(4, "cm"));
console.log(math.trianglePerimeter(10, 10, 15, "cm"));
console.log(math.trapeziumPerimeter(10, 12, 5, 5, "cm"));
console.log(math.parallelogramPerimeter(10, 6, "cm"));
console.log(math.circleCircumference(7, "cm"));

2D Shapes Area

const { ShapesArea2D } = require("math-help");

let math = new ShapesArea2D();

console.log(math.rectangleArea(10, 8, "cm"));
console.log(math.squareArea(4, "cm"));
console.log(math.triangleArea(10, 5, "cm"));
console.log(math.trapeziumArea(10, 12, 5, "cm"));
console.log(math.parallelogramArea(13, 3, "cm"));
console.log(math.circleArea(7, "cm"));

3D Shapes Surface Area

const { ShapesSurfaceArea3D } = require("math-help");

let math = new ShapesSurfaceArea3D();

console.log(math.cuboidSurfaceArea(12, 6, 3, "cm"));
console.log(math.cubeSurfaceArea(12, "cm"));
console.log(math.coneSurfaceArea(7, 10, "cm"));
console.log(math.cylinderSurfaceArea(7, 10, "cm"));
console.log(math.sphereSurfaceArea(7, "cm"));

3D Shapes Volume

const { ShapesVolume3D } = require("math-help");

let math = new ShapesVolume3D();

console.log(math.cuboidVolume(12, 6, 3, "cm"));
console.log(math.cubeVolume(12, "cm"));
console.log(math.coneVolume(7, 10, "cm"));
console.log(math.cylinderVolume(7, 10, "cm"));
console.log(math.sphereVolume(7, "cm"));

Coordinate Geometry

const { CoordinateGeometry } = require("math-help");

let math = new CoordinateGeometry();

console.log(math.sectionPoint(4, 5, 6, 3, 2, 3));
console.log(math.midPoint(4, 5, 6, 3));
console.log(math.distance(4, 5, 6, 3));
console.log(math.centroid(7, 4, 5, 3, 2, 4));
console.log(math.slope(4, 6, 5, 3));
console.log(math.reflectInXAxis(3, 4));
console.log(math.reflectInYAxis(3, 4));
console.log(math.reflectInOrigin(-3, 4));

Conversion

const { Conversion } = require("math-help");

let math = new Conversion();

console.log(math.degreeToRadian(30));
console.log(math.radianToDegree(0.5));
console.log(math.kilometerToMeter(6.9));
console.log(math.meterToKilometer(6975));
console.log(math.kilometerToMile(6.9));
console.log(math.mileToKilometer(6975));

Want more help?

You can go to - Click Here

Want to contribute this project?

Donate us on Patreon - https://patreon.com/ashutoshswamy

1.5.0

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.0.4

1 year ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago