Skip to content

Commit 3a91c75

Browse files
committed
Make aabb::contains_point half-open
1 parent b713315 commit 3a91c75

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

splashsurf_lib/src/aabb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ where
171171
&self.min + (self.extents() / (R::one() + R::one()))
172172
}
173173

174-
/// Checks if the given point is inside or on the boundary of the AABB
174+
/// Checks if the given point is inside of the AABB, the AABB is considered to be half-open to its max coordinate
175175
pub fn contains_point(&self, point: &VectorN<R, D>) -> bool {
176176
for i in 0..D::dim() {
177-
if point[i] <= self.min[i] || point[i] >= self.max[i] {
177+
if point[i] < self.min[i] || point[i] >= self.max[i] {
178178
return false;
179179
}
180180
}

0 commit comments

Comments
 (0)