Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turf/rhumb-bearing

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-bearing - npm Package Compare versions

Comparing version 4.5.2 to 4.6.0

32

index.js

@@ -16,22 +16,4 @@ // https://en.wikipedia.org/wiki/Rhumb_line

* @example
* var point1 = {
* "type": "Feature",
* "properties": {
* "marker-color": "#F00"
* },
* "geometry": {
* "type": "Point",
* "coordinates": [-75.343, 39.984]
* }
* };
* var point2 = {
* "type": "Feature",
* "properties": {
* "marker-color": "#00F"
* },
* "geometry": {
* "type": "Point",
* "coordinates": [-75.534, 39.123]
* }
* };
* var point1 = turf.point([-75.343, 39.984], {"marker-color": "#F00"});
* var point2 = turf.point([-75.534, 39.123], {"marker-color": "#00F"});
*

@@ -41,5 +23,5 @@ * var bearing = turf.rhumbBearing(point1, point2);

* //addToMap
* var addToMap = [point1, point2]
* point1.properties.bearing = bearing
* point2.properties.bearing = bearing
* var addToMap = [point1, point2]
*/

@@ -56,8 +38,6 @@ module.exports = function (start, end, final) {

var bear360;
if (final) {
bear360 = destination.rhumbBearingTo(origin);
} else {
bear360 = origin.rhumbBearingTo(destination);
}
if (final) bear360 = destination.rhumbBearingTo(origin);
else bear360 = origin.rhumbBearingTo(destination);
var bear180 = (bear360 > 180) ? -(360 - bear360) : bear360;

@@ -64,0 +44,0 @@

8

package.json
{
"name": "@turf/rhumb-bearing",
"version": "4.5.2",
"version": "4.6.0",
"description": "turf rhumb-bearing module",

@@ -38,4 +38,4 @@ "main": "index.js",

"devDependencies": {
"@turf/destination": "^4.5.2",
"@turf/helpers": "^4.5.2",
"@turf/destination": "^4.6.0",
"@turf/helpers": "^4.6.0",
"benchmark": "^2.1.4",

@@ -46,5 +46,5 @@ "tape": "^4.6.3",

"dependencies": {
"@turf/invariant": "^4.5.2",
"@turf/invariant": "^4.6.0",
"geodesy": "1.1.1"
}
}

@@ -17,22 +17,4 @@ # @turf/rhumb-bearing

```javascript
var point1 = {
"type": "Feature",
"properties": {
"marker-color": "#F00"
},
"geometry": {
"type": "Point",
"coordinates": [-75.343, 39.984]
}
};
var point2 = {
"type": "Feature",
"properties": {
"marker-color": "#00F"
},
"geometry": {
"type": "Point",
"coordinates": [-75.534, 39.123]
}
};
var point1 = turf.point([-75.343, 39.984], {"marker-color": "#F00"});
var point2 = turf.point([-75.534, 39.123], {"marker-color": "#00F"});

@@ -42,5 +24,5 @@ var bearing = turf.rhumbBearing(point1, point2);

//addToMap
var addToMap = [point1, point2]
point1.properties.bearing = bearing
point2.properties.bearing = bearing
var addToMap = [point1, point2]
```

@@ -47,0 +29,0 @@

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