Skip to content
New issue

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

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

Already on GitHub? # to your account

Add Cartesian3.midpoint #6836

Merged
merged 3 commits into from
Jul 24, 2018
Merged

Add Cartesian3.midpoint #6836

merged 3 commits into from
Jul 24, 2018

Conversation

hpinkos
Copy link
Contributor

@hpinkos hpinkos commented Jul 24, 2018

Added a helper function to Cartesian3 for finding the midpoint between two points

@cesium-concierge
Copy link

Thanks for the pull request @hpinkos!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

* @returns {Cartesian3} The midpoint.
*/
Cartesian3.midpoint = function(left, right, result) {
result.x = (left.x + right.x) * 0.5;
Copy link
Contributor

Choose a reason for hiding this comment

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

Since left, right, and result are required, check that they are defined.

@hpinkos
Copy link
Contributor Author

hpinkos commented Jul 24, 2018

Thanks @bagnell, this is ready now

@bagnell bagnell merged commit d3d3089 into master Jul 24, 2018
@bagnell bagnell deleted the computeMidpoint branch July 24, 2018 22:57
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants