1.0.1 • Published 7 years ago

coders-shape v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

Coders-shape

This package will help you find out area and perimeter of shapes like circle, square and many more!

Installing

npm install coders-shape --save
yarn install coders-shape

Example

// This is an example with javascript
// This example will show the result in console, if done with values

const shape = require('coders-shape');

console.log(shape.circle.area(radius));
console.log(shape.circle.circumference(radius));
console.log(shape.square.area(length));
console.log(shape.square.perimeter(length));
console.log(shape.rectangle.area(length, width));
console.log(shape.rectangle,perimeter(length, width));
console.log(shape.triangle.area(base, height));
console.log(shape.triangle.perimeter(side1, side2, base));
console.log(shape.trapezoid.area(a, b, height));
console.log(shape.trapezoid.perimeter(a, b, c, d));

// NOTE: The radius, length, width, height, side1, side2 and base should be values. 
// It is just there for showing the order.
// Proceeding with that will cause error.

Author

1.0.1

7 years ago

1.0.0

7 years ago