remove
Removes a specified KDTreeNode from the KD-Tree.
The method removes the given node from the tree while preserving the tree's structure and properties. If the node is a leaf, it will simply be removed; otherwise, rebalancing actions may be performed.
Return
The KDTreeNode that replaces the removed node, or null if the node is a leaf or if no replacement occurs.
Parameters
node
The KDTreeNode to be removed from the KD-Tree.