npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

geometry-calculator-x

v1.0.1

Published

A Javascript library that performs the C.A.G Geometry Calculator requirements.

Downloads

2

Readme

geometry-calculator-x

A Javascript library that performs the C.A.G Geometry Calculator requirements.

es5-sham.js monkey-patches other ES5 methods as closely as possible. For these methods, as closely as possible to ES5 is not very close. Many of these shams are intended only to allow code to be written to ES5 without causing run-time errors in older engines. In many cases, this means that these shams cause many ES5 methods to silently fail. Decide carefully whether this is what you want. Note: es5-sham.js requires es5-shim.js to be able to work properly.

json3.js monkey-patches the EcmaScript 5 JSON implimentation faithfully.

es6-shim.js provides compatibility shims so that legacy JavaScript engines behave as closely as possible to ECMAScript 6 (Harmony).

es7-shim.js provides compatibility shims so that legacy JavaScript engines behave as closely as possible to ECMAScript 7.

See: https://gist.github.com/KristofferV/952493dfa53b1349e684c4fa2f203403
Version: 1.0.1
Author: Xotic750 [email protected]
License: MIT
Copyright: Xotic750

geometry-calculator-x~Shape

Kind: inner class of geometry-calculator-x
this: {Shape}
Access: public

new Shape()

The base object for other shapes to inherit from.

shape.circumference()number

Zero for the default shape.

Kind: instance method of Shape
Returns: number - The circumference unit distance measurement.
this: {Shape}
Access: public

shape.area()number

Zero for the default shape.

Kind: instance method of Shape
Returns: number - The area unit square measurement.
this: {Shape}
Access: public

geometry-calculator-x~RightAngledTriangle

Kind: inner class of geometry-calculator-x
this: {RightAngledTriangle}
Access: public

new RightAngledTriangle(x, y, h)

A right triangle (American English) or right-angled triangle (British English) is a triangle in which one angle is a right angle (that is, a 90-degree angle). The relation between the sides and angles of a right triangle is the basis for trigonometry.

| Param | Type | Description | | --- | --- | --- | | x | number | The base unit distance measurement. | | y | number | The height unit distance measurement. | | h | number | The hypotenuse unit distance measurement. |

Example

var triangle = new RightAngledTriangle(3, 4, 5);
console.log(triangle.circumference()); // 12
console.log(triangle.area()); // 6

rightAngledTriangle.circumference()number

The circumference of a right angled triangle is the sum of the three side lengths.

Kind: instance method of RightAngledTriangle
Returns: number - The circumference unit distance measurement.
this: {RightAngledTriangle}
Access: public

rightAngledTriangle.area()number

The area is given by the area formula for an arbitrary triangle.

If the triangle is right angled, as in this case, the side y is the same as the height an y is the same as the base line.

Kind: instance method of RightAngledTriangle
Returns: number - The area unit square measurement.
this: {RightAngledTriangle}
Access: public

geometry-calculator-x~Rectangle

Kind: inner class of geometry-calculator-x
this: {Rectangle}
Access: public

new Rectangle(x, y)

In Euclidean plane geometry, a rectangle is a quadrilateral with four right angles. It can also be defined as an equiangular quadrilateral, since equiangular means that all of its angles are equal. It can also be defined as a parallelogram containing a right angle. A rectangle with four sides of equal length is a square. The term oblong is occasionally used to refer to a non-square rectangle.

| Param | Type | Description | | --- | --- | --- | | x | number | The base unit distance measurement. | | y | number | The height unit distance measurement. |

Example

var rectangle = new Rectangle(3, 4, 5);
console.log(rectangle.circumference()); // 14
console.log(rectangle.area()); // 12

rectangle.circumference()number

The circumference of a rectangle is the sum of the two side lengths then doubled.

Kind: instance method of Rectangle
Returns: number - The circumference unit distance measurement.
this: {Rectangle}
Access: public

rectangle.area()number

To find the area of a rectangle, multiply the length by the width.

Kind: instance method of Rectangle
Returns: number - The area unit square measurement.
this: {Rectangle}
Access: public

geometry-calculator-x~Circle

Kind: inner class of geometry-calculator-x
this: {Circle}
Access: public

new Circle(r)

A circle is a simple closed shape in Euclidean geometry. It is the set of all points in a plane that are at a given distance from a given point, the centre; equivalently it is the curve traced out by a point that moves so that its distance from a given point is constant. The distance between any of the points and the centre is called the radius.

| Param | Type | Description | | --- | --- | --- | | r | number | The radius unit distance measurement. |

Example

var circle = new Circle(3);
console.log(circle.circumference()); // 18.84
console.log(circle.area()); // 28.27

circle.circumference()number

The circumference of a circle relates to one of the most important mathematical constants in all of mathematics.

Kind: instance method of Circle
Returns: number - The circumference unit distance measurement.
this: {Circle}
Access: public

circle.area()number

To find the area of a circle.

Kind: instance method of Circle
Returns: number - The area unit square measurement.
this: {Circle}
Access: public

geometry-calculator-x~ShapesArea

Kind: inner class of geometry-calculator-x
this: {ShapesArea}
Access: public

new ShapesArea(...varArgs)

Total area of multiple shapes (not only triangles and rectangles but also other types of shapes that impliment #area).

| Param | Type | Description | | --- | --- | --- | | ...varArgs | Object | The shapes to calculate the total area of. |

Example

var shapesArea = new ShapesArea(triangle, rectangle, circle);
console.log(shapesArea.area()); // 46.27

shapesArea.area()number

To find the area of all the shapes supplied to the constructor.

Kind: instance method of ShapesArea
Returns: number - The area unit square measurement.
this: {ShapesArea}
Access: public