npam-simple-math-utils
v1.2.2
Published
A Math utility functions for finding area of Rectangle and circle
Readme
npam-simple-math-utils
A simple Node.js package for calculating areas of rectangles and circles.
Installation
npm install npam-simple-math-utilsUsage
import { area_rectangle, area_circle } from 'npam-simple-math-utils';
// Calculate rectangle area
const rectArea = area_rectangle(5, 3);
console.log('Rectangle area:', rectArea); // 15
// Calculate circle area
const circleArea = area_circle(4);
console.log('Circle area:', circleArea.toFixed(2)); // 100.48API
area_rectangle(width, height)
Calculates the area of a rectangle.
width(number): Width of the rectangleheight(number): Height of the rectangle- Returns: Area of the rectangle
area_circle(radius)
Calculates the area of a circle.
radius(number): Radius of the circle- Returns: Area of the circle
License
ISC
Author
Manivannan
