Open HarshPurohit1260 opened 1 year ago
Hello, first thanks a lot for your code it helped me in understanding quad tree and resolving similar issue.
now i want to understand one thing in locateAndCreateNodeForPoint as follow:
if (longitude < mBounds.x + halfWidth) { if (latitude < mBounds.y + halfHeight) // CREATE OR RETURN mTopLeftNode // CREATE OR RETURN mBottomLeftNode } if (latitude < mBounds.y + halfHeight) // CREATE OR RETURN mTopRightNode // CREATE OR RETURN mBottomRightNode
in above part of code the latitude condition is determining that node is bottom node or not instead of top node so should it be like follow?
if (longitude < mBounds.x + halfWidth) { if (latitude < mBounds.y + halfHeight) // CREATE OR RETURN mBottomLeftNode // CREATE OR RETURN mTopLeftNode } if (latitude < mBounds.y + halfHeight) // CREATE OR RETURN mBottomRightNode // CREATE OR RETURN mTopRightNode
just want to understand this part.
Hello, first thanks a lot for your code it helped me in understanding quad tree and resolving similar issue.
now i want to understand one thing in locateAndCreateNodeForPoint as follow:
in above part of code the latitude condition is determining that node is bottom node or not instead of top node so should it be like follow?
just want to understand this part.