1.0.4 • Published 3 years ago

npmtestshapes v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

This is a test NPM package. If this works correctly you should be able to find out some information about shapes by providing the height, width or radius.

Setting our variables (you don't have to do this)

let height = 10, width = 10, radius = 5;

let rectangle = new Rectangle(height, width);

let triangle = new Triangle(height, width)

let circle = new Circle(radius)

From the above we would get this

rectangle

rectangle.height = 10 rectangle.width = 10 rectangle.area = 100 rectangle.perimeter = 40

triangle

triangle.height = 10 triangle.width = 10 triangle.area = 50 triangle.pythagoras = 14.142135623730951

circle

circle.radius = 5 circle.diameter = 10 circle.area = 78.53981633974483 circle.circumference = 31.41592653589793

More shapes will be added in the future, thank you for your support and patience! Check out my website here.