You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of the above assertions fail, which seems to contradiction the documentation of the from_points method, according to which it "Returns the smallest box containing all of the provided points." Basically the maximum point passed in will never actually be contained in the box.
This should be a very simple fix, and I'm happy to implement it once this has been confirmed as a genuine bug.
The text was updated successfully, but these errors were encountered:
You are right, the documentation is misleading here. The behavior of contains purposefully excludes points on the right and bottom edges, downstream users rely on points being contained by a single box in an arrangement of side-by-side touching but non overlapping ones.
No problem, this is something I can easily work around if it's the intended behavior. I'll leave it up to you whether to change the documentation to reflect the fact that not all points will be contained in the box.
Really liking the crate by the way! I am migrating my codebase to use euclid instead of cgmath, since it has some nice features (boxes being one of them!) that cgmath does not have.
I get that the
max
of the box structs are non-inclusive, and that is all fine. However, consider this code:All of the above assertions fail, which seems to contradiction the documentation of the
from_points
method, according to which it "Returns the smallest box containing all of the provided points." Basically the maximum point passed in will never actually be contained in the box.This should be a very simple fix, and I'm happy to implement it once this has been confirmed as a genuine bug.
The text was updated successfully, but these errors were encountered: