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

Disallow creating a degenerate line segment #96

Closed
itzpr3d4t0r opened this issue Sep 24, 2022 · 0 comments · Fixed by #97
Closed

Disallow creating a degenerate line segment #96

itzpr3d4t0r opened this issue Sep 24, 2022 · 0 comments · Fixed by #97
Labels
submodule:line type:bug Something isn't working

Comments

@itzpr3d4t0r
Copy link
Member

itzpr3d4t0r commented Sep 24, 2022

Right now we allow having a "point" line segment:

line = Line(1, 1, 1, 1)

This has to be fixed. many times we divide by x2-x1 or y2-y1 and that will error out.
My idea is to implement a new check function to add inside the pgLine_FromObject function after the line attributes are set that checks their validity. if not it will error out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
submodule:line type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant