Skip to content

Commit

Permalink
Remove unsued getFacing() from vector code
Browse files Browse the repository at this point in the history
  • Loading branch information
Axionize committed Nov 3, 2024
1 parent b026f49 commit 270f160
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/main/java/ac/grim/grimac/utils/math/GrimMath.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,27 +113,4 @@ public static long hashCode(double x, int y, double z) {
l = l * l * 42317861L + l * 11L;
return l >> 16;
}

public static BlockFace getFacing(double x, double y, double z) {
return getFacing((float)x, (float)y, (float)z);
}

public static BlockFace getFacing(float x, float y, float z) {
BlockFace direction = BlockFace.NORTH;
float f = Float.MIN_VALUE;

for (BlockFace direction2 : BlockFace.values()) {
float g = x * (float)direction2.getModX() + y * (float)direction2.getModY() + z * (float)direction2.getModZ();
if (g > f) {
f = g;
direction = direction2;
}
}

return direction;
}

public static BlockFace getFacing(Vector3d vec) {
return getFacing(vec.x, vec.y, vec.z);
}
}

0 comments on commit 270f160

Please sign in to comment.