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

Better handling of empty rects #182

Closed

Conversation

michaelkirk
Copy link
Member

  • I agree to follow the project's code of conduct.
  • [ not yet] I added an entry to rstar/CHANGELOG.md if knowledge of this change could be valuable to users.

As an alternative to #181, which fixes the same bug, but maintains the spirit of #162 by avoiding comparison with huge/tiny floats.

This is a draft because there are several things I'm not sure how to handle, and I'm out of time for today! But if someone is interested in building off of it, feel free!

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] }
```
@adamreichold
Copy link
Member

Having thought about this a bit, I think the max/min representation of empty AABB is indeed superior and avoids additional overhead for most users (i.e. those not using fixed-precision integer coordinates), i.e. I would prefer #181 or #184 over this one.

@michaelkirk
Copy link
Member Author

Superseded by #184

@michaelkirk michaelkirk closed this Nov 5, 2024
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.

2 participants