// Test nnearest() method in 3D
localflag=false;
for (i=0;i<M;i++) {
n4=myran.int32p() % N;
tree3.nnearest(n4,nn,dn,K); // Find K nearest Points
// See if there is anything closer than the furthest
// of these points, other than the other points in the list nn[]
far=0.0;
nfar=0;
for (j=0;j<K;j++)