code: @Override
  	protected void checkBestDistance(KdTree.Node node, P target) {
  		double distanceSq = distance.distance((P)node.point,target);
  		if( distanceSq <= bestDistanceSq ) {
  			if( bestNode == null || distanceSq < bestDistanceSq ) {
  				bestDistanceSq = distanceSq;
  				bestNode = node;
  			}
  		}
  	}
docs: Checks to see if the current node's point is the closet point found so far