Skip to content

Explaining a comment #152

@dbuenzli

Description

@dbuenzli

Hello,

Not an issue per se but the explanation of a comment.

I was reading your implementation and saw this comment here. The implementation of this part of the algorithm is quite convoluted in the reference implementation (available here which I believe this is a mirror on github). I haven't fully wrapped my head around yet…

The reference implementation uses indices 2 and 1 here. But if you are here in the code, left points coincide, this means you went through this line which pushes a 0 (NULL) at index 0, before the events.

In your code you track this via a boolean, not a NULL value in the events array. So this is why 1 and 0 are the correct values in your implementation, your events are not shifted to position 2 and 1 by a NULL value. :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions