# location-math

> A small library for working with Geolocation coordinates

Latest version **0.1.0** (published 2014-09-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install location-math
pnpm add location-math
yarn add location-math
bun add location-math
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-09-04 |
| First published | 2014-09-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sebastian Rehm |
| Maintainers | bastire |
| Keywords | geolocation, coordinates |

## Links

- npm: https://www.npmjs.com/package/location-math
- Repository: https://github.com/bastiRe/location-math
- Issues: https://github.com/bastiRe/location-math/issues
- npm.io page: https://npm.io/package/location-math

## Recent versions

- 0.1.0 (latest) — 2014-09-04

## README

location-math
=============

A small javascript library for common calculations with a geolocation.

Usage
-----
Geolocation objects are always expected in the form of {lat: ..., lon: ...} with
the latitude and longitude as floats

    var locationMath = require('location-math');

    distance = locationMath.getDistanceBetween(coords1, coords2);


API
-----
###getDistance(coords1, coords2)
Returns the distance between two spherical coordinates in meters

###getBoundingBox(coords, distance)
Returns the bounding box for given spherical coordinates and distance in meters

###getCentroid(coordinatesArray)
Returns the centroid of a polygon given by the coordinatesArray

License
-------
MIT

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