@sanketm09/geometry_shapes
v1.0.2
Published
"A Node.js package for geometric calculations related to rectangles and squares, including area, perimeter, and diagonal calculations. Ideal for applications requiring mathematical operations on these shapes."
Downloads
2
Readme
Geometric Shapes Calculator
This npm package provides functions for calculating properties of various geometric shapes, including triangles, squares, circles, rectangles, parallelograms, rhombuses, kites, trapezoids, ellipses, regular polygons, cylinders, cones, spheres, tori (doughnut shapes), frustums (truncated cones), and pyramids.
Installation
You can install the package via npm:
npm install @sanketm09/geometry_shapes
Usage
You can use the functions provided by this package to calculate different properties of geometric shapes. Below are examples of how to use each function:
const {triangle ,circle} = require('@sanketm09/geometry_shapes');
All shapes list : - triangle, square, circle, rectangle, parallelogram, rhombus, kite, trapezoid, ellipse, regularPolygon, cylinder, cone, sphere, torus, frustum, pyramid
// Example usage of each function
triangle(3, 4, 5); square(6); circle(7); rectangle(4, 8); parallelogram(8, 5); rhombus(6, 8); kite(6, 8); trapezoid(4, 6, 5); ellipse(6, 4); regularPolygon(6, 4); cylinder(5, 8); cone(6, 8); sphere(6); torus(8, 4); frustum(6, 8, 5); pyramid(4, 6, 8);