Permalink
Browse files

Rounded the nearest neighbor distance to the nearest interger

  • Loading branch information...
1 parent cfc9951 commit 4cde2e2e7062149550d40b86f79208d02d7604fb @TankofVines committed Aug 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 node_ppa.js
View
@@ -84,7 +84,7 @@ function nndist(query, res, callback) {
nndistsum += nnarray[j];
meanDist(j+1);
} else {
- nnvalue = nndistsum / nnarray.length;
+ nnvalue = Math.round(nndistsum / nnarray.length);
}
}
meanDist(0);

0 comments on commit 4cde2e2

Please sign in to comment.