@ Override public KdTree . Node findNeighbor ( P target ) { if ( tree . root == null ) return null ; this . target = target ; this . closest = null ; this . bestDistanceSq = maxDistanceSq ; stepClosest ( tree . root ) ; return closest ; }
Finds the node which is closest to target