Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added bearingToAngle method to turf-helpers #663

Merged
merged 4 commits into from
Apr 12, 2017
Merged

Conversation

stebogit
Copy link
Collaborator

No description provided.

@@ -331,5 +349,6 @@ module.exports = {
multiPolygon: multiPolygon,
radiansToDistance: radiansToDistance,
distanceToRadians: distanceToRadians,
distanceToDegrees: distanceToDegrees
distanceToDegrees: distanceToDegrees,
bearingToAngle: bearingToAngle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Just a side note: This syntax "looks ugly" since now you can use Shorthand property names in ES2015. https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Object_initializer
However this is needed because TurfJS aims to be ES5 compatible.

@DenisCarriere
Copy link
Member

👍 Very handy little function, I know I've had to use this before in the past and it always takes at least 5-10 minutes to figure out the correct modulus operation to apply.

I added the function the main packages/turf/index.js & packages/turf/index.d.ts, Lerna bundles the dependencies as symbolic links, so don't hesitate to update the core repo whenever you need to add new features or new modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants