georust / rstar

R*-tree spatial index for the Rust ecosystem
https://docs.rs/rstar
Apache License 2.0
414 stars 68 forks source link

Fix AABB::from_points which relied on implementation details of AABB::new_empty #171

Closed adamreichold closed 5 months ago

adamreichold commented 5 months ago

This method does not just need an empty AABB, but actually requires that the lower/upper corners use max/min values of the point coordinates.

This change therefore open-codes this to keep these invariants and the code that relies on them close together.

A changelog entry should not be necessary as we luckily did not yet release the regression.

Closes #170