I’m working on a QuadTree implementation and levereging the BoundinBox class. I’m a bit baffled by the extendSize property, and I think my understanding might be off?
Let’s say we define a BoundingBox with:
min: 0, 0, 0
max: 1000, 0, 1000
I would expect the following:
center 500, 0, 500
size 1000, 0, 1000 ??
But at the moment the size is 500, 0, 500 - and looking at the code it does seem correct:
Any idea why the size would be 500 when I would expect a side size (in the case of a rectangle, or square) - to be 1000?
My math skills are not great, but I’d like to try to understand exactly why size is defined as (max - min) / 2.