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

πŸ› Fix Rectangle.FromSides creation #380

Merged
merged 2 commits into from
Mar 4, 2024

Conversation

tomrijnbeek
Copy link
Member

@tomrijnbeek tomrijnbeek commented Mar 4, 2024

✨ What's this?

This PR fixes the Rectangle.FromSides method to create the correct rectangle. Right now it has the X and Y dimensions flipped.

πŸ” Why do we want this?

To have correctly oriented rectangles.

πŸ— How is it done?

First added a test case to reproduce the bug, then fixed it. Also added some other basic test cases for similar code paths for consistency. We could be testing Rectangle much more but that was not the intent of this PR.

πŸ’₯ Breaking changes

If people considered this a feature... they really shouldn't

πŸ¦‹ Side effects

I disabled the .NET 5 tests since .NET 5 is no longer supported and it wouldn't run locally on my machine. We should probably stop supporting it altogether but I'll leave that to a separate PR.

@tomrijnbeek tomrijnbeek merged commit df35bd2 into master Mar 4, 2024
1 check passed
@tomrijnbeek tomrijnbeek deleted the fix-rectangle-dimensions branch March 4, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants