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

Box2: Ensure that empty intersections in .intersect() result in fully empty boxes. #25546

Merged
merged 1 commit into from
Feb 23, 2023

Conversation

ycw
Copy link
Contributor

@ycw ycw commented Feb 22, 2023

as if box3, ensures returned empty box has inf. bounds if there's no intersections; otherwise, subsequent set ops broke, e.g:

box2 intersect

Expected: A.intersect(B).union(C).equals(C)
Actual: A.intersect(B).union(C).equals(D)

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 22, 2023

The PR which originally added the line to Box3 also explains everything in detail: #8643

@Mugen87 Mugen87 changed the title Fix Box2 instersection Box2: Ensure that empty intersections in .intersect() result in fully empty boxes. Feb 22, 2023
@Mugen87 Mugen87 added this to the r150 milestone Feb 22, 2023
@mrdoob mrdoob merged commit 3e2a373 into mrdoob:dev Feb 23, 2023
@ycw ycw deleted the box2-intersect branch February 24, 2023 07:57
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.

3 participants