Skip to content

Fix zero length when first 2 points are same#956

Merged
nical merged 1 commit into
nical:mainfrom
fundon:fix_zero_length
May 3, 2026
Merged

Fix zero length when first 2 points are same#956
nical merged 1 commit into
nical:mainfrom
fundon:fix_zero_length

Conversation

@fundon
Copy link
Copy Markdown
Contributor

@fundon fundon commented Apr 17, 2026

When the first 2 points are same, cur.distance - prev.distance will be 0.
And it will throw an error assertion failed: p.x.is_finite().

When 0 is detected, it can be returned directly.

Copy link
Copy Markdown
Owner

@nical nical left a comment

Choose a reason for hiding this comment

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

Thanks for this PR and apologies for the delay. Looks good!

@nical nical merged commit 4547a97 into nical:main May 3, 2026
3 checks passed
@nical nical mentioned this pull request May 3, 2026
@fundon fundon deleted the fix_zero_length branch May 4, 2026 00:02
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.

2 participants