Socket
Socket
Sign inDemoInstall

@turf/rhumb-distance

Package Overview
Dependencies
Maintainers
4
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/rhumb-distance - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

index.d.ts

5

index.js

@@ -36,3 +36,3 @@ "use strict";

var distanceInMeters = calculateRhumbDistance(origin, destination);
var distance = helpers_1.convertLength(distanceInMeters, 'meters', options.units);
var distance = helpers_1.convertLength(distanceInMeters, "meters", options.units);
return distance;

@@ -70,4 +70,5 @@ }

// if dLon over 180° take shorter rhumb line across the anti-meridian:
if (DeltaLambda > Math.PI)
if (DeltaLambda > Math.PI) {
DeltaLambda -= 2 * Math.PI;
}
// on Mercator projection, longitude distances shrink by latitude; q is the 'stretch factor'

@@ -74,0 +75,0 @@ // q becomes ill-conditioned along E-W line (0/0); use empirical tolerance to avoid it

9

package.json
{
"name": "@turf/rhumb-distance",
"version": "6.0.0",
"version": "6.0.1",
"description": "turf rhumb-distance module",
"main": "index",
"types": "index.d.ts",
"files": [
"index.js",
"index.ts"
"index.d.ts"
],

@@ -47,3 +48,5 @@ "scripts": {

"tape": "*",
"write-json-file": "*"
"write-json-file": "*",
"tslint": "*",
"@types/tape": "*"
},

@@ -50,0 +53,0 @@ "dependencies": {

@@ -7,3 +7,3 @@ # @turf/rhumb-distance

Calculates the distance along a rhumb line between two [points](https://tools.ietf.org/html/rfc7946#section-3.1.2) in degrees, radians,
Calculates the distance along a rhumb line between two [points][1] in degrees, radians,
miles, or kilometers.

@@ -13,6 +13,6 @@

- `from` **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** origin point
- `to` **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** destination point
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Optional parameters
- `options.units` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** can be degrees, radians, miles, or kilometers (optional, default `"kilometers"`)
- `from` **[Coord][2]** origin point
- `to` **[Coord][2]** destination point
- `options` **[Object][3]?** Optional parameters
- `options.units` **[string][4]** can be degrees, radians, miles, or kilometers (optional, default `"kilometers"`)

@@ -34,4 +34,14 @@ **Examples**

Returns **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** distance between the two points
Returns **[number][5]** distance between the two points
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[2]: https://tools.ietf.org/html/rfc7946#section-3.1.1
[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
<!-- This file is automatically generated. Please don't edit it directly:

@@ -38,0 +48,0 @@ if you find an error, edit the source file (likely index.js), and re-run

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc