Skip to content

Is Aabb2d::contains intended to use inclusive bounds? #22117

@unagii256

Description

@unagii256

Hi Bevy team,

I have a question about the design of Aabb2d::contains.

The current implementation treats AABB boundaries as inclusive
(other.min >= self.min && other.max <= self.max), which effectively makes
it a closed interval. In some domains, half-open intervals are common, so
I wanted to check whether this inclusive behavior is intentional.

Is Aabb2d meant to be understood primarily as a geometric/continuous
shape rather than a logical or grid-aligned region?

Thanks for the clarification!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MathFundamental domain-agnostic mathematical operationsC-BugAn unexpected or incorrect behaviorD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesS-Needs-DesignThis issue requires design work to think about how it would best be accomplished

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions