Skip to content

Commit

Permalink
Add manhattan method for having one block.
Browse files Browse the repository at this point in the history
  • Loading branch information
asofold committed Feb 16, 2014
1 parent 5c29859 commit 3f78497
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -382,6 +382,18 @@ public static final float yawDiff(float fromYaw, float toYaw){
return yawDiff;
}

/**
* Manhattan distance.
* @param x1
* @param y1
* @param z1
* @param block
* @return
*/
public static int manhattan(final int x1, final int y1, final int z1, final Block block) {
return manhattan(x1, y1, z1, block.getX(), block.getY(), block.getZ());
}

/**
* Manhattan distance (steps along the sides of an orthogonal grid).
* @param x1
Expand Down

0 comments on commit 3f78497

Please sign in to comment.