-
Notifications
You must be signed in to change notification settings - Fork 68
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 empty rect behavior by reverting 84d12654104e783011f24267145fb6bfccd2a30e #181
Conversation
Failing test is ``` assertion `left == right` failed left: AABB { lower: [-0.5, -0.5], upper: [-0.5, -0.5] } right: AABB { lower: [-0.5, -0.5], upper: [0.0, 0.0] } ```
…choosing a more tame value for AABB::new_empty (georust#162)" This reverts commit 84d1265.
let subject = empty.merged(&other); | ||
assert_eq!(other, subject); | ||
|
||
let other = AABB::from_corners([-0.5, -0.5], [-0.5, -0.5]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other cases pass, but this one fails with:
```
assertion `left == right` failed
left: AABB { lower: [-0.5, -0.5], upper: [-0.5, -0.5] }
right: AABB { lower: [-0.5, -0.5], upper: [0.0, 0.0] }
```
A more rigorous solution would probably make use of an explicit |
I guess we can infer empty based on the "nonsense" state of |
I don't think we can just revert it as now the removed test case
There are certainly different options, but I am also wary of making |
One option I see is to revert the empty representation back to "(max_value, min_value)" but change the |
I'm happy to have you take this in any direction - but I think getting the wrong answer is almost always a bigger concern than getting a slightly slower answer. |
Unfortunately, I'm out of time for today, but please feel free to solve the problem with or without my particular solution. |
Sadly, I see no viable option to wire this through our trait bounds ending in |
superseded by #184 |
rstar/CHANGELOG.md
if knowledge of this change could be valuable to users.reverts #162
I'm not really a regular rstar contributor, and I don't know that a simple reversion is the best way to solve this problem.