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

[distance] Add support for DG/GC in distance(). #922

Merged
merged 2 commits into from
Oct 17, 2021

Conversation

awulkiew
Copy link
Member

No description provided.

}, it->second);

// The smallest possible distance found, end searching.
if (! is_first && result <= zero)
Copy link
Member

Choose a reason for hiding this comment

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

is it possible that result is negative?

Copy link
Member Author

Choose a reason for hiding this comment

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

Technically it is, a (potentially user-defined) strategy can return any value. Possible reason may be an error or floating-point issue.

include/boost/geometry/algorithms/detail/visit.hpp Outdated Show resolved Hide resolved
box2_t b2 = geometry::return_envelope<box2_t>(g2, strategies);
geometry::detail::expand_by_epsilon(b2);

for (auto it = rtree.qbegin(index::nearest(b2, rtree.size())) ; it != rtree_qend ; ++it)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor, several lines are too long, I guess we still try to limit width up to 80 chars?

Copy link
Member Author

Choose a reason for hiding this comment

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

We increased max to 100 some time ago. From Guidelines-for-Developers:

  • The preferred line length is 80 characters, with maximum length of 100.
    • The limit is relaxed for very long string literals (e.g. Well-Known Text with data used in tests and examples).

@awulkiew awulkiew merged commit 31b36b9 into boostorg:develop Oct 17, 2021
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.

None yet

3 participants