# polygonal

> A simple library to get polygonal numbers

Latest version **1.0.2** (published 2015-04-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install polygonal
pnpm add polygonal
yarn add polygonal
bun add polygonal
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-04-15 |
| First published | 2015-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Vinicius Veroneze |
| Maintainers | viniciusvgv |

## Links

- npm: https://www.npmjs.com/package/polygonal
- Repository: https://github.com/viniciusvgv/polygonal
- Issues: https://github.com/viniciusvgv/polygonal/issues
- npm.io page: https://npm.io/package/polygonal

## Recent versions

- 1.0.2 (latest) — 2015-04-15
- 1.0.1 — 2015-04-14
- 1.0.0 — 2015-04-14

## README

# polygonal

NodeJs module for getting polygonal numbers


### The Polygonal Numbers
Polygonal numbers are numbers that can be arranged in a regular polygon if they're represented as dots.

***eg.:***

![triangular numbers](http://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Polygonal_Number_3.gif/500px-Polygonal_Number_3.gif)

>Triangular numbers


#### Formula
The formula to get the n*th* polygonal number of a s-sided polygon is:

![polygonal formula](http://upload.wikimedia.org/math/1/6/5/165a6f556c360f45d08ed3cfb622ec21.png)


### Installation
This module is on the npm repository, to intall it run the following command
```sh
$ npm install polygonal
```


### Usage
```javascript
var polygonal = require('polygonal');

// get the second pentagonal
var x = polygonal.getSGonal(5, 2);
var y = polygonal.getPentagonal(2);

// x is equal to y!!
```


###References
http://en.wikipedia.org/wiki/Polygonal_number

---
_Source: https://npm.io/package/polygonal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
