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

feat!: rework clipline #16

Merged
merged 27 commits into from
Aug 11, 2024
Merged

feat!: rework clipline #16

merged 27 commits into from
Aug 11, 2024

Conversation

nxsaken
Copy link
Owner

@nxsaken nxsaken commented Aug 11, 2024

This is a complete rewrite of clipline.

Highlights

  • Introduces iterators for raw and clipped axis-aligned, diagonal and arbitrary line segments.
    • Provides specialized iterators for signed-axis-aligned, quadrant-covered and octant-covered line segments.
  • Introduces a new clipping algorithm, synthesizing the works of Sobkow-Pospisil-Yang (1987), Dörr (1990), and Kuzmin (1995).
  • Removes integer overflow and division by zero (closes Forbid arithmetic_side_effects #10).
    • Ensures iterators are defined on the whole numeric domain.
  • Adds support for unsigned coordinates (closes Support all integral numeric types #12).
  • Adds property tests (via proptest) ensuring clipped iterators produce the same points as raw iterators clipped naively.

…ping)

Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
… tests

Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
Signed-off-by: Nurzhan Sakén <nurzhan.sakenov@gmail.com>
@nxsaken nxsaken merged commit d42cde7 into main Aug 11, 2024
12 checks passed
@nxsaken nxsaken deleted the feat/rework branch August 12, 2024 07:10
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.

Support all integral numeric types Forbid arithmetic_side_effects
1 participant