diff --git a/src/main/java/net/imglib2/kdtree/KDTreeUtils.java b/src/main/java/net/imglib2/kdtree/KDTreeUtils.java index e60ee2014..2f937912a 100644 --- a/src/main/java/net/imglib2/kdtree/KDTreeUtils.java +++ b/src/main/java/net/imglib2/kdtree/KDTreeUtils.java @@ -226,7 +226,7 @@ static double[][] unflatten( double[] positions, final int n ) for (int i = 0; i < positions.length; ++i ) { final int d = i % n; - unflattened[ d ][ i / n + d ] = positions[ i ]; + unflattened[ d ][ i / n ] = positions[ i ]; } return unflattened;