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

Reversing the order of arguments to segment_intersect in polygon_add_point causes failing tests #40

Open
MaxineK36 opened this issue Apr 19, 2021 · 0 comments

Comments

@MaxineK36
Copy link

Currently, polygon_add_point (in polygon.c) makes a call to segment_intersect before adding a point to the polygon (line 116). However, when the order of the two segments is swapped, the return value of segment_intersect changes, and polygon_add_point fails in some of the tests when it's expected to succeed.

As students are updating this code to work with their new segment structs, they may (understandably) ignore the order of segments and accidentally swap them; due to the above issue, they then end up stuck trying to figure out why the tests suddenly fail.

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

No branches or pull requests

1 participant