From c1b89ad1e60cdc70d30873280d45e477ea504798 Mon Sep 17 00:00:00 2001 From: Sunstrike Date: Tue, 10 Dec 2013 00:28:21 +0000 Subject: [PATCH] DirectionUtils. --- src/mantle/world/DirectionUtils.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/mantle/world/DirectionUtils.java diff --git a/src/mantle/world/DirectionUtils.java b/src/mantle/world/DirectionUtils.java new file mode 100644 index 0000000..a4e6e4c --- /dev/null +++ b/src/mantle/world/DirectionUtils.java @@ -0,0 +1,19 @@ +package mantle.world; + +import net.minecraftforge.common.ForgeDirection; + +/** + * Helper functions for dealing with ForgeDirection + * + * @author Sunstrike + */ +public class DirectionUtils { + + private DirectionUtils() {} // All static + + public static boolean isRightAngles(ForgeDirection a, ForgeDirection b) + { + return a != b && a != b.getOpposite() && a != ForgeDirection.UNKNOWN && b != ForgeDirection.UNKNOWN; + } + +}