Skip to content

Conversation

@Tristramg
Copy link
Contributor

This could result in a big drift when both part didn’t progress at the same pace

Closes https://github.com/osrd-project/osrd-data-issues/issues/888

.anchors
.windows(2)
.find(|window| window[1].curve_position() >= curve_position)
.or_else(|| self.anchors.windows(2).last())
Copy link
Contributor

Choose a reason for hiding this comment

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

I don’t understand how this helps, shouldn’t we error instead of providing this fallback which does not provide anchors on each side of the curve_position. If it is really helpful, maybe a comment to explain why would help?

EDIT: discuss yesterday, there is a reason for this, yet, a comment might be useful, or a test maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a comment. The test existed, but I added an explicit comment

This could result in a big drift when both part didn’t progress at the
same pace

Signed-off-by: Tristram Gräbener <[email protected]>
Signed-off-by: Tristram Gräbener <[email protected]>
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