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

parity with js version #4

Closed
wants to merge 18 commits into from
Closed

parity with js version #4

wants to merge 18 commits into from

Conversation

morishuz
Copy link
Collaborator

@morishuz morishuz commented Sep 8, 2018

  • added important changes from new js version to cpp
  • removed issue with std::move. coords is now just an argument: simpler and safer.
  • simplified sorting (helped with previous point)
  • added tests to compare 5000 vertex triangulation with new js version

e = m_hull[e].next;
while(!orient(x, y,m_hl[e].x, m_hl[e].y,m_hl[m_hl[e].next].x, m_hl[m_hl[e].next].y))
{
e = m_hl[e].next;

if (e == start) {
throw runtime_error("Something is wrong with the input points.");
Copy link
Contributor

Choose a reason for hiding this comment

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

This place is different in JS — let's port over the fix here too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

very good, i missed that. fixed now

const long int n = coords.size() >> 1;
Delaunator::Delaunator()
{
m_epilon = std::pow(2,-52);
Copy link
Contributor

Choose a reason for hiding this comment

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

typo (epsilon)

@delfrrr
Copy link
Owner

delfrrr commented Sep 9, 2018

@morishuz thank you for PR! Unfortunately I have to suggest to close it:

  1. Please note Various library layout updates #3 and Use mapbox hpp skel #6 ; it will change literally all files and complicated conflicts are inevitable. I suggest to continue with improvements after Use mapbox hpp skel #6 is merged (or on top of Use mapbox hpp skel #6 )
  2. Please, avoid big multi-feature PR (this one can easily split on 4 PR's)
  3. Before implementing parity with JS version code we need parity with JS version tests

@delfrrr
Copy link
Owner

delfrrr commented Sep 29, 2018

Already fixed by other commits, see #2

@delfrrr delfrrr closed this Sep 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants