std::numeric_limits<decltype(closestDistance)>::max()
also, whitespace before {
method can be renamed to closestObject once you filter out self in the WorldTreeQuery